@atlaskit/quick-search 8.2.4 → 9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/quick-search
2
2
 
3
+ ## 9.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#105355](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105355)
8
+ [`ca71694e29a27`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca71694e29a27) -
9
+ Removed dependency on `@atlaskit/item` and replaced its usage with `@atlaskit/menu`. The following
10
+ ResultItem props have been **removed** as a result of this change:
11
+
12
+ - onMouseEnter
13
+ - onMouseLeave
14
+ - isCompact
15
+ - linkComponent
16
+
17
+ Additionally the following types have changed:
18
+
19
+ - ResultItemGroup's `title` prop has been restricted to `string`
20
+ - ResultItem's `onClick` prop has been changed to
21
+ `(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): void` to match that of
22
+ `@atlaskit/menu`'s LinkItem types
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 8.2.4
4
29
 
5
30
  ### Patch Changes
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -14,13 +13,10 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
15
  var _react = _interopRequireDefault(require("react"));
17
- var _item = _interopRequireWildcard(require("@atlaskit/item"));
16
+ var _menu = require("@atlaskit/menu");
18
17
  var _styled = require("./styled");
19
- 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); }
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 && {}.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
18
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
22
19
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
23
- var Item = (0, _item.withItemClick)((0, _item.withItemFocus)(_item.default));
24
20
  var ResultItem = /*#__PURE__*/function (_React$PureComponent) {
25
21
  function ResultItem() {
26
22
  (0, _classCallCheck2.default)(this, ResultItem);
@@ -39,18 +35,14 @@ var ResultItem = /*#__PURE__*/function (_React$PureComponent) {
39
35
  var wrappedSubText = this.props.subText ? /*#__PURE__*/_react.default.createElement(_styled.ResultItemSubText, null, this.props.subText) : null;
40
36
  var interactiveWrapperProps = {
41
37
  onClick: this.props.onClick,
42
- onMouseEnter: this.props.onMouseEnter,
43
- onMouseLeave: this.props.onMouseLeave,
44
38
  href: this.props.href
45
39
  };
46
- return /*#__PURE__*/_react.default.createElement(Item, (0, _extends2.default)({
47
- elemBefore: icon,
48
- elemAfter: after,
49
- description: wrappedSubText,
40
+ return /*#__PURE__*/_react.default.createElement(_menu.LinkItem, (0, _extends2.default)({
41
+ iconBefore: icon,
42
+ iconAfter: after,
43
+ description: wrappedSubText || undefined,
50
44
  isSelected: this.props.isSelected,
51
- isCompact: this.props.isCompact,
52
- target: this.props.target,
53
- linkComponent: this.props.linkComponent
45
+ target: this.props.target
54
46
  }, interactiveWrapperProps), this.props.text, wrappedCaption);
55
47
  }
56
48
  }]);
@@ -11,8 +11,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
11
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
12
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
13
  var _react = _interopRequireDefault(require("react"));
14
- var _item = require("@atlaskit/item");
15
- var _styled = require("./styled");
14
+ var _menu = require("@atlaskit/menu");
16
15
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
17
16
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
17
  var ResultItemGroup = exports.default = /*#__PURE__*/function (_React$Component) {
@@ -27,10 +26,9 @@ var ResultItemGroup = exports.default = /*#__PURE__*/function (_React$Component)
27
26
  var _this$props = this.props,
28
27
  title = _this$props.title,
29
28
  children = _this$props.children;
30
- var wrappedTitle = /*#__PURE__*/_react.default.createElement(_styled.ResultItemGroupHeader, null, /*#__PURE__*/_react.default.createElement(_styled.ResultItemGroupTitle, null, title));
31
- return /*#__PURE__*/_react.default.createElement(_item.ItemGroup, {
32
- title: wrappedTitle
33
- }, children);
29
+ return /*#__PURE__*/_react.default.createElement(_menu.MenuGroup, null, /*#__PURE__*/_react.default.createElement(_menu.Section, {
30
+ title: title
31
+ }, children));
34
32
  }
35
33
  }]);
36
34
  }(_react.default.Component);
@@ -4,26 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.ResultItemTextAfter = exports.ResultItemSubText = exports.ResultItemIcon = exports.ResultItemGroupTitle = exports.ResultItemGroupHeader = exports.ResultItemCaption = exports.ResultItemAfterWrapper = exports.ResultItemAfter = void 0;
7
+ exports.ResultItemTextAfter = exports.ResultItemSubText = exports.ResultItemIcon = exports.ResultItemCaption = exports.ResultItemAfterWrapper = exports.ResultItemAfter = void 0;
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _colors = require("@atlaskit/theme/colors");
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
 
12
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
13
- var ResultItemGroupHeader = exports.ResultItemGroupHeader = _styledComponents.default.div({
14
- display: 'flex',
15
- marginLeft: "var(--ds-space-negative-150, -12px)",
16
- marginTop: "var(--ds-space-150, 12px)"
17
- });
18
-
19
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
20
- var ResultItemGroupTitle = exports.ResultItemGroupTitle = _styledComponents.default.div({
21
- font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
22
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
23
- lineHeight: '16px',
24
- fontWeight: "var(--ds-font-weight-semibold, 600)"
25
- });
26
-
27
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
28
13
  var ResultItemAfter = exports.ResultItemAfter = _styledComponents.default.div(function (props) {
29
14
  return {
@@ -120,11 +120,9 @@ var ResultBase = exports.ResultBase = /*#__PURE__*/function (_React$PureComponen
120
120
  href = _this$props3.href,
121
121
  target = _this$props3.target,
122
122
  icon = _this$props3.icon,
123
- isCompact = _this$props3.isCompact,
124
123
  subText = _this$props3.subText,
125
124
  text = _this$props3.text,
126
- resultId = _this$props3.resultId,
127
- context = _this$props3.context;
125
+ resultId = _this$props3.resultId;
128
126
  var isMouseSelected = this.state.isMouseSelected;
129
127
  return /*#__PURE__*/_react.default.createElement(_context.SelectedResultIdContext.Consumer, null, function (selectedResultId) {
130
128
  return /*#__PURE__*/_react.default.createElement(_ResultItem.default, {
@@ -132,17 +130,13 @@ var ResultBase = exports.ResultBase = /*#__PURE__*/function (_React$PureComponen
132
130
  href: href,
133
131
  target: target,
134
132
  icon: icon,
135
- isCompact: isCompact,
136
133
  isSelected: resultId === selectedResultId,
137
134
  onClick: _this2.handleClick,
138
- onMouseEnter: _this2.handleMouseEnter,
139
- onMouseLeave: _this2.handleMouseLeave,
140
135
  isMouseSelected: isMouseSelected,
141
136
  subText: subText,
142
137
  text: text,
143
138
  textAfter: elemAfter,
144
- selectedIcon: selectedIcon,
145
- linkComponent: context.linkComponent
139
+ selectedIcon: selectedIcon
146
140
  });
147
141
  });
148
142
  }
@@ -1,9 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
- import baseItem, { withItemClick, withItemFocus } from '@atlaskit/item';
4
+ import { LinkItem } from '@atlaskit/menu';
5
5
  import { ResultItemAfter, ResultItemAfterWrapper, ResultItemCaption, ResultItemIcon, ResultItemTextAfter, ResultItemSubText } from './styled';
6
- const Item = withItemClick(withItemFocus(baseItem));
7
6
  class ResultItem extends React.PureComponent {
8
7
  render() {
9
8
  const icon = this.props.icon ? /*#__PURE__*/React.createElement(ResultItemIcon, null, this.props.icon) : null;
@@ -15,18 +14,14 @@ class ResultItem extends React.PureComponent {
15
14
  const wrappedSubText = this.props.subText ? /*#__PURE__*/React.createElement(ResultItemSubText, null, this.props.subText) : null;
16
15
  const interactiveWrapperProps = {
17
16
  onClick: this.props.onClick,
18
- onMouseEnter: this.props.onMouseEnter,
19
- onMouseLeave: this.props.onMouseLeave,
20
17
  href: this.props.href
21
18
  };
22
- return /*#__PURE__*/React.createElement(Item, _extends({
23
- elemBefore: icon,
24
- elemAfter: after,
25
- description: wrappedSubText,
19
+ return /*#__PURE__*/React.createElement(LinkItem, _extends({
20
+ iconBefore: icon,
21
+ iconAfter: after,
22
+ description: wrappedSubText || undefined,
26
23
  isSelected: this.props.isSelected,
27
- isCompact: this.props.isCompact,
28
- target: this.props.target,
29
- linkComponent: this.props.linkComponent
24
+ target: this.props.target
30
25
  }, interactiveWrapperProps), this.props.text, wrappedCaption);
31
26
  }
32
27
  }
@@ -1,15 +1,13 @@
1
1
  import React from 'react';
2
- import { ItemGroup } from '@atlaskit/item';
3
- import { ResultItemGroupTitle, ResultItemGroupHeader } from './styled';
2
+ import { MenuGroup, Section } from '@atlaskit/menu';
4
3
  export default class ResultItemGroup extends React.Component {
5
4
  render() {
6
5
  const {
7
6
  title,
8
7
  children
9
8
  } = this.props;
10
- const wrappedTitle = /*#__PURE__*/React.createElement(ResultItemGroupHeader, null, /*#__PURE__*/React.createElement(ResultItemGroupTitle, null, title));
11
- return /*#__PURE__*/React.createElement(ItemGroup, {
12
- title: wrappedTitle
13
- }, children);
9
+ return /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(Section, {
10
+ title: title
11
+ }, children));
14
12
  }
15
13
  }
@@ -1,21 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import styled from 'styled-components';
3
3
  import { N200 } from '@atlaskit/theme/colors';
4
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
- export const ResultItemGroupHeader = styled.div({
6
- display: 'flex',
7
- marginLeft: "var(--ds-space-negative-150, -12px)",
8
- marginTop: "var(--ds-space-150, 12px)"
9
- });
10
-
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
12
- export const ResultItemGroupTitle = styled.div({
13
- font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
14
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
15
- lineHeight: '16px',
16
- fontWeight: "var(--ds-font-weight-semibold, 600)"
17
- });
18
-
19
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
20
5
  export const ResultItemAfter = styled.div(props => ({
21
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -93,11 +93,9 @@ export class ResultBase extends React.PureComponent {
93
93
  href,
94
94
  target,
95
95
  icon,
96
- isCompact,
97
96
  subText,
98
97
  text,
99
- resultId,
100
- context
98
+ resultId
101
99
  } = this.props;
102
100
  const {
103
101
  isMouseSelected
@@ -107,17 +105,13 @@ export class ResultBase extends React.PureComponent {
107
105
  href: href,
108
106
  target: target,
109
107
  icon: icon,
110
- isCompact: isCompact,
111
108
  isSelected: resultId === selectedResultId,
112
109
  onClick: this.handleClick,
113
- onMouseEnter: this.handleMouseEnter,
114
- onMouseLeave: this.handleMouseLeave,
115
110
  isMouseSelected: isMouseSelected,
116
111
  subText: subText,
117
112
  text: text,
118
113
  textAfter: elemAfter,
119
- selectedIcon: selectedIcon,
120
- linkComponent: context.linkComponent
114
+ selectedIcon: selectedIcon
121
115
  }));
122
116
  }
123
117
  }
@@ -8,9 +8,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React from 'react';
11
- import baseItem, { withItemClick, withItemFocus } from '@atlaskit/item';
11
+ import { LinkItem } from '@atlaskit/menu';
12
12
  import { ResultItemAfter, ResultItemAfterWrapper, ResultItemCaption, ResultItemIcon, ResultItemTextAfter, ResultItemSubText } from './styled';
13
- var Item = withItemClick(withItemFocus(baseItem));
14
13
  var ResultItem = /*#__PURE__*/function (_React$PureComponent) {
15
14
  function ResultItem() {
16
15
  _classCallCheck(this, ResultItem);
@@ -29,18 +28,14 @@ var ResultItem = /*#__PURE__*/function (_React$PureComponent) {
29
28
  var wrappedSubText = this.props.subText ? /*#__PURE__*/React.createElement(ResultItemSubText, null, this.props.subText) : null;
30
29
  var interactiveWrapperProps = {
31
30
  onClick: this.props.onClick,
32
- onMouseEnter: this.props.onMouseEnter,
33
- onMouseLeave: this.props.onMouseLeave,
34
31
  href: this.props.href
35
32
  };
36
- return /*#__PURE__*/React.createElement(Item, _extends({
37
- elemBefore: icon,
38
- elemAfter: after,
39
- description: wrappedSubText,
33
+ return /*#__PURE__*/React.createElement(LinkItem, _extends({
34
+ iconBefore: icon,
35
+ iconAfter: after,
36
+ description: wrappedSubText || undefined,
40
37
  isSelected: this.props.isSelected,
41
- isCompact: this.props.isCompact,
42
- target: this.props.target,
43
- linkComponent: this.props.linkComponent
38
+ target: this.props.target
44
39
  }, interactiveWrapperProps), this.props.text, wrappedCaption);
45
40
  }
46
41
  }]);
@@ -6,8 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
- import { ItemGroup } from '@atlaskit/item';
10
- import { ResultItemGroupTitle, ResultItemGroupHeader } from './styled';
9
+ import { MenuGroup, Section } from '@atlaskit/menu';
11
10
  var ResultItemGroup = /*#__PURE__*/function (_React$Component) {
12
11
  function ResultItemGroup() {
13
12
  _classCallCheck(this, ResultItemGroup);
@@ -20,10 +19,9 @@ var ResultItemGroup = /*#__PURE__*/function (_React$Component) {
20
19
  var _this$props = this.props,
21
20
  title = _this$props.title,
22
21
  children = _this$props.children;
23
- var wrappedTitle = /*#__PURE__*/React.createElement(ResultItemGroupHeader, null, /*#__PURE__*/React.createElement(ResultItemGroupTitle, null, title));
24
- return /*#__PURE__*/React.createElement(ItemGroup, {
25
- title: wrappedTitle
26
- }, children);
22
+ return /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(Section, {
23
+ title: title
24
+ }, children));
27
25
  }
28
26
  }]);
29
27
  }(React.Component);
@@ -1,21 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import styled from 'styled-components';
3
3
  import { N200 } from '@atlaskit/theme/colors';
4
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
- export var ResultItemGroupHeader = styled.div({
6
- display: 'flex',
7
- marginLeft: "var(--ds-space-negative-150, -12px)",
8
- marginTop: "var(--ds-space-150, 12px)"
9
- });
10
-
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
12
- export var ResultItemGroupTitle = styled.div({
13
- font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
14
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
15
- lineHeight: '16px',
16
- fontWeight: "var(--ds-font-weight-semibold, 600)"
17
- });
18
-
19
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
20
5
  export var ResultItemAfter = styled.div(function (props) {
21
6
  return {
@@ -115,11 +115,9 @@ export var ResultBase = /*#__PURE__*/function (_React$PureComponent) {
115
115
  href = _this$props3.href,
116
116
  target = _this$props3.target,
117
117
  icon = _this$props3.icon,
118
- isCompact = _this$props3.isCompact,
119
118
  subText = _this$props3.subText,
120
119
  text = _this$props3.text,
121
- resultId = _this$props3.resultId,
122
- context = _this$props3.context;
120
+ resultId = _this$props3.resultId;
123
121
  var isMouseSelected = this.state.isMouseSelected;
124
122
  return /*#__PURE__*/React.createElement(SelectedResultIdContext.Consumer, null, function (selectedResultId) {
125
123
  return /*#__PURE__*/React.createElement(ResultItem, {
@@ -127,17 +125,13 @@ export var ResultBase = /*#__PURE__*/function (_React$PureComponent) {
127
125
  href: href,
128
126
  target: target,
129
127
  icon: icon,
130
- isCompact: isCompact,
131
128
  isSelected: resultId === selectedResultId,
132
129
  onClick: _this2.handleClick,
133
- onMouseEnter: _this2.handleMouseEnter,
134
- onMouseLeave: _this2.handleMouseLeave,
135
130
  isMouseSelected: isMouseSelected,
136
131
  subText: subText,
137
132
  text: text,
138
133
  textAfter: elemAfter,
139
- selectedIcon: selectedIcon,
140
- linkComponent: context.linkComponent
134
+ selectedIcon: selectedIcon
141
135
  });
142
136
  });
143
137
  }
@@ -8,18 +8,12 @@ type Props = {
8
8
  target?: string;
9
9
  /** React element to appear to the left of the text. This should be an @atlaskit/icon component. */
10
10
  icon?: React.ReactNode;
11
- /** Makes the navigation item appear with reduced padding and font size. */
12
- isCompact?: boolean;
13
11
  /** Set whether the item should be highlighted as selected. Selected items have a different background color. */
14
12
  isSelected?: boolean;
15
13
  /** Set whether the item has been highlighted using mouse navigation. Mouse selected items will not display the selectedIcon. */
16
14
  isMouseSelected?: boolean;
17
15
  /** Function to be called on click. This is passed down to a custom link component, if one is provided. */
18
- onClick?(e: MouseEvent): void;
19
- /** Standard onmouseenter event */
20
- onMouseEnter?: (e: MouseEvent) => void;
21
- /** Standard onmouseleave event */
22
- onMouseLeave?: (e: MouseEvent) => void;
16
+ onClick?(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): void;
23
17
  /** Text to be shown alongside the main `text`. */
24
18
  subText?: React.ReactNode;
25
19
  /** Main text to be displayed as the item. Accepts a react component but in most cases this should just be a string. */
@@ -28,8 +22,6 @@ type Props = {
28
22
  textAfter?: React.ReactNode;
29
23
  /** React component to be placed to the right of the main text when the item is selected with keyboard navigation. */
30
24
  selectedIcon?: React.ReactNode;
31
- /** React component to be used for rendering links */
32
- linkComponent?: React.ComponentType;
33
25
  };
34
26
  declare class ResultItem extends React.PureComponent<Props> {
35
27
  static defaultProps: Partial<Props>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  type Props = {
3
3
  /** Text to appear as heading above group. Will be auto-capitalised. */
4
- title: React.ReactNode;
4
+ title: string;
5
5
  /** React Elements to be displayed within the group. This should generally be a collection of ResultItems. */
6
6
  children?: React.ReactNode;
7
7
  };
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const ResultItemGroupHeader: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
3
- export declare const ResultItemGroupTitle: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
4
2
  export declare const ResultItemAfter: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
5
3
  shouldTakeSpace: boolean;
6
4
  }, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -8,18 +8,12 @@ type Props = {
8
8
  target?: string;
9
9
  /** React element to appear to the left of the text. This should be an @atlaskit/icon component. */
10
10
  icon?: React.ReactNode;
11
- /** Makes the navigation item appear with reduced padding and font size. */
12
- isCompact?: boolean;
13
11
  /** Set whether the item should be highlighted as selected. Selected items have a different background color. */
14
12
  isSelected?: boolean;
15
13
  /** Set whether the item has been highlighted using mouse navigation. Mouse selected items will not display the selectedIcon. */
16
14
  isMouseSelected?: boolean;
17
15
  /** Function to be called on click. This is passed down to a custom link component, if one is provided. */
18
- onClick?(e: MouseEvent): void;
19
- /** Standard onmouseenter event */
20
- onMouseEnter?: (e: MouseEvent) => void;
21
- /** Standard onmouseleave event */
22
- onMouseLeave?: (e: MouseEvent) => void;
16
+ onClick?(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): void;
23
17
  /** Text to be shown alongside the main `text`. */
24
18
  subText?: React.ReactNode;
25
19
  /** Main text to be displayed as the item. Accepts a react component but in most cases this should just be a string. */
@@ -28,8 +22,6 @@ type Props = {
28
22
  textAfter?: React.ReactNode;
29
23
  /** React component to be placed to the right of the main text when the item is selected with keyboard navigation. */
30
24
  selectedIcon?: React.ReactNode;
31
- /** React component to be used for rendering links */
32
- linkComponent?: React.ComponentType;
33
25
  };
34
26
  declare class ResultItem extends React.PureComponent<Props> {
35
27
  static defaultProps: Partial<Props>;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  type Props = {
3
3
  /** Text to appear as heading above group. Will be auto-capitalised. */
4
- title: React.ReactNode;
4
+ title: string;
5
5
  /** React Elements to be displayed within the group. This should generally be a collection of ResultItems. */
6
6
  children?: React.ReactNode;
7
7
  };
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const ResultItemGroupHeader: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
3
- export declare const ResultItemGroupTitle: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
4
2
  export declare const ResultItemAfter: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
5
3
  shouldTakeSpace: boolean;
6
4
  }, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/quick-search",
3
- "version": "8.2.4",
3
+ "version": "9.0.0",
4
4
  "description": "A quick-search component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,10 +30,10 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/analytics": "^8.2.0",
32
32
  "@atlaskit/avatar": "^21.17.0",
33
- "@atlaskit/item": "^12.1.0",
33
+ "@atlaskit/menu": "^2.13.8",
34
34
  "@atlaskit/spinner": "^16.3.0",
35
35
  "@atlaskit/theme": "^14.0.0",
36
- "@atlaskit/tokens": "^3.0.0",
36
+ "@atlaskit/tokens": "^3.2.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "keycode": "^2.1.7"
39
39
  },