@atlaskit/link-picker 1.18.2 → 1.18.4

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,4 +1,5 @@
1
- /// <reference types="react" />
1
+ /** @jsx jsx */
2
+ import { KeyboardEvent } from 'react';
2
3
  import { LinkSearchListItemData } from '../../types';
3
4
  export declare const messages: {
4
5
  titleRecentlyViewed: {
@@ -24,14 +25,15 @@ export declare const testIds: {
24
25
  searchResultLoadingIndicator: string;
25
26
  emptyResultPage: string;
26
27
  };
27
- export interface LinkSearchListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onMouseEnter' | 'onMouseLeave'> {
28
+ declare type LinkSearchListElement = HTMLElement;
29
+ export interface LinkSearchListProps extends Omit<React.HTMLAttributes<LinkSearchListElement>, 'onSelect' | 'onChange'> {
28
30
  items?: LinkSearchListItemData[] | null;
29
31
  isLoading: boolean;
30
32
  selectedIndex: number;
31
33
  activeIndex: number;
34
+ onChange: (objectId: string) => void;
32
35
  onSelect: (objectId: string) => void;
33
- onMouseEnter: (objectId: string) => void;
34
- onMouseLeave: (objectId: string) => void;
36
+ onKeyDown?: (e: KeyboardEvent<LinkSearchListElement>) => void;
35
37
  ariaControls?: string;
36
38
  ariaLabelledBy?: string;
37
39
  role?: string;
@@ -1,17 +1,16 @@
1
- /// <reference types="react" />
2
- import { WrappedComponentProps } from 'react-intl-next';
1
+ /** @jsx jsx */
2
+ import { KeyboardEvent } from 'react';
3
3
  import { LinkSearchListItemData } from '../../types';
4
4
  export interface Props {
5
5
  item: LinkSearchListItemData;
6
6
  selected: boolean;
7
7
  active: boolean;
8
+ tabIndex?: number;
8
9
  onSelect: (objectId: string) => void;
9
- onMouseEnter: (objectId: string) => void;
10
- onMouseLeave: (objectId: string) => void;
10
+ onKeyDown: (e: KeyboardEvent<HTMLDivElement>) => void;
11
+ onFocus: () => void;
11
12
  id?: string;
12
13
  role?: string;
13
14
  }
14
- declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<WrappedComponentProps<"intl"> & Props>> & {
15
- WrappedComponent: import("react").ComponentType<WrappedComponentProps<"intl"> & Props>;
16
- };
17
- export default _default;
15
+ declare const LinkSearchListItem: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
16
+ export default LinkSearchListItem;
@@ -1,5 +1,5 @@
1
1
  export declare const relativeFontSizeToBase16: (px: number | string) => string;
2
- export declare const composeListItemStyles: (active?: boolean, selected?: boolean) => import("@emotion/react").SerializedStyles;
2
+ export declare const composeListItemStyles: (selected?: boolean) => import("@emotion/react").SerializedStyles;
3
3
  export declare const itemNameStyles: import("@emotion/react").SerializedStyles;
4
4
  export declare const listItemNameStyles: import("@emotion/react").SerializedStyles;
5
5
  export declare const listItemContextStyles: import("@emotion/react").SerializedStyles;
@@ -8,3 +8,4 @@ export declare const isRedoEvent: (e: KeyboardEvent<HTMLInputElement>) => boolea
8
8
  */
9
9
  export declare const getDataSource: (item: LinkSearchListItemData, plugin?: LinkPickerPlugin | undefined) => string;
10
10
  export declare function getScreenReaderText(items: LinkSearchListItemData[], selectedIndex: number, intl: IntlShape): string | undefined;
11
+ export declare const handleNavKeyDown: (event: KeyboardEvent<HTMLElement>, itemsLength: number, activeIndex: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.18.2",
3
+ "version": "1.18.4",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -33,14 +33,14 @@
33
33
  "@atlaskit/analytics-next": "^9.0.0",
34
34
  "@atlaskit/button": "^16.6.0",
35
35
  "@atlaskit/empty-state": "^7.4.0",
36
- "@atlaskit/form": "^8.8.0",
36
+ "@atlaskit/form": "^8.9.0",
37
37
  "@atlaskit/frontend-utilities": "^2.4.0",
38
38
  "@atlaskit/icon": "^21.11.0",
39
39
  "@atlaskit/linking-common": "^2.4.0",
40
40
  "@atlaskit/spinner": "^15.4.0",
41
41
  "@atlaskit/tabs": "^13.3.0",
42
42
  "@atlaskit/textfield": "^5.3.0",
43
- "@atlaskit/theme": "^12.3.0",
43
+ "@atlaskit/theme": "^12.4.0",
44
44
  "@atlaskit/tokens": "^1.2.0",
45
45
  "@atlaskit/tooltip": "^17.7.0",
46
46
  "@atlaskit/ufo": "^0.1.0",