@atlaskit/link-picker 1.8.2 → 1.8.5

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.
Files changed (91) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics.codegen.js +1 -1
  3. package/dist/cjs/{ui/link-picker → common/utils}/url.js +0 -0
  4. package/dist/cjs/controllers/use-fix-height/index.js +27 -0
  5. package/dist/cjs/services/use-plugins/index.js +48 -90
  6. package/dist/cjs/services/use-plugins/reducer.js +64 -0
  7. package/dist/cjs/services/use-plugins/utils.js +134 -0
  8. package/dist/cjs/services/use-search-query/index.js +1 -1
  9. package/dist/cjs/services/with-link-picker-analytics/index.js +33 -0
  10. package/dist/cjs/ui/link-picker/form-footer/index.js +76 -0
  11. package/dist/cjs/ui/link-picker/form-footer/styled.js +17 -0
  12. package/dist/cjs/ui/link-picker/index.js +33 -75
  13. package/dist/cjs/ui/link-picker/link-search-error/index.js +47 -6
  14. package/dist/cjs/ui/link-picker/link-search-list/index.js +89 -20
  15. package/dist/cjs/ui/link-picker/link-search-list/link-search-no-results/index.js +54 -0
  16. package/dist/cjs/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/index.js +0 -0
  17. package/dist/cjs/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/styled.js +0 -0
  18. package/dist/cjs/ui/link-picker/link-search-list/link-search-no-results/styled.js +17 -0
  19. package/dist/cjs/ui/link-picker/link-search-list/styled.js +13 -6
  20. package/dist/cjs/ui/link-picker/messages.js +0 -50
  21. package/dist/cjs/ui/link-picker/styled.js +16 -11
  22. package/dist/cjs/ui/link-picker/text-input/styled.js +1 -1
  23. package/dist/cjs/version.json +1 -1
  24. package/dist/es2019/analytics.codegen.js +1 -1
  25. package/dist/es2019/{ui/link-picker → common/utils}/url.js +0 -0
  26. package/dist/es2019/controllers/use-fix-height/index.js +19 -0
  27. package/dist/es2019/services/use-plugins/index.js +35 -57
  28. package/dist/es2019/services/use-plugins/reducer.js +37 -0
  29. package/dist/es2019/services/use-plugins/utils.js +59 -0
  30. package/dist/es2019/services/use-search-query/index.js +1 -1
  31. package/dist/es2019/services/with-link-picker-analytics/index.js +15 -0
  32. package/dist/es2019/ui/link-picker/form-footer/index.js +51 -0
  33. package/dist/es2019/ui/link-picker/form-footer/styled.js +5 -0
  34. package/dist/es2019/ui/link-picker/index.js +28 -69
  35. package/dist/es2019/ui/link-picker/link-search-error/index.js +40 -4
  36. package/dist/es2019/ui/link-picker/link-search-list/index.js +60 -14
  37. package/dist/es2019/ui/link-picker/link-search-list/link-search-no-results/index.js +35 -0
  38. package/dist/es2019/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/index.js +0 -0
  39. package/dist/es2019/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/styled.js +0 -0
  40. package/dist/es2019/ui/link-picker/link-search-list/link-search-no-results/styled.js +6 -0
  41. package/dist/es2019/ui/link-picker/link-search-list/styled.js +23 -2
  42. package/dist/es2019/ui/link-picker/messages.js +0 -50
  43. package/dist/es2019/ui/link-picker/styled.js +20 -15
  44. package/dist/es2019/ui/link-picker/text-input/styled.js +3 -1
  45. package/dist/es2019/version.json +1 -1
  46. package/dist/esm/analytics.codegen.js +1 -1
  47. package/dist/esm/{ui/link-picker → common/utils}/url.js +0 -0
  48. package/dist/esm/controllers/use-fix-height/index.js +19 -0
  49. package/dist/esm/services/use-plugins/index.js +49 -94
  50. package/dist/esm/services/use-plugins/reducer.js +43 -0
  51. package/dist/esm/services/use-plugins/utils.js +111 -0
  52. package/dist/esm/services/use-search-query/index.js +1 -1
  53. package/dist/esm/services/with-link-picker-analytics/index.js +17 -0
  54. package/dist/esm/ui/link-picker/form-footer/index.js +53 -0
  55. package/dist/esm/ui/link-picker/form-footer/styled.js +6 -0
  56. package/dist/esm/ui/link-picker/index.js +29 -74
  57. package/dist/esm/ui/link-picker/link-search-error/index.js +41 -5
  58. package/dist/esm/ui/link-picker/link-search-list/index.js +67 -13
  59. package/dist/esm/ui/link-picker/link-search-list/link-search-no-results/index.js +37 -0
  60. package/dist/esm/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/index.js +0 -0
  61. package/dist/esm/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/styled.js +0 -0
  62. package/dist/esm/ui/link-picker/link-search-list/link-search-no-results/styled.js +6 -0
  63. package/dist/esm/ui/link-picker/link-search-list/styled.js +11 -5
  64. package/dist/esm/ui/link-picker/messages.js +0 -50
  65. package/dist/esm/ui/link-picker/styled.js +14 -11
  66. package/dist/esm/ui/link-picker/text-input/styled.js +1 -1
  67. package/dist/esm/version.json +1 -1
  68. package/dist/types/analytics.codegen.d.ts +7 -4
  69. package/dist/types/{ui/link-picker → common/utils}/url.d.ts +0 -0
  70. package/dist/types/controllers/use-fix-height/index.d.ts +8 -0
  71. package/dist/types/services/use-plugins/reducer.d.ts +30 -0
  72. package/dist/types/services/use-plugins/utils.d.ts +18 -0
  73. package/dist/types/services/with-link-picker-analytics/index.d.ts +4 -0
  74. package/dist/types/ui/link-picker/form-footer/index.d.ts +13 -0
  75. package/dist/types/ui/link-picker/form-footer/styled.d.ts +1 -0
  76. package/dist/types/ui/link-picker/index.d.ts +19 -19
  77. package/dist/types/ui/link-picker/link-search-error/index.d.ts +19 -3
  78. package/dist/types/ui/link-picker/link-search-list/index.d.ts +30 -5
  79. package/dist/types/ui/link-picker/link-search-list/link-search-no-results/index.d.ts +19 -0
  80. package/dist/types/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/index.d.ts +0 -0
  81. package/dist/types/ui/link-picker/{link-search-no-results → link-search-list/link-search-no-results}/no-results-svg/styled.d.ts +0 -0
  82. package/dist/types/ui/link-picker/link-search-list/link-search-no-results/styled.d.ts +1 -0
  83. package/dist/types/ui/link-picker/link-search-list/styled.d.ts +1 -0
  84. package/dist/types/ui/link-picker/messages.d.ts +0 -50
  85. package/dist/types/ui/link-picker/styled.d.ts +5 -1
  86. package/package.json +12 -12
  87. package/report.api.md +2 -0
  88. package/dist/cjs/ui/link-picker/link-search-no-results/index.js +0 -27
  89. package/dist/es2019/ui/link-picker/link-search-no-results/index.js +0 -10
  90. package/dist/esm/ui/link-picker/link-search-no-results/index.js +0 -14
  91. package/dist/types/ui/link-picker/link-search-no-results/index.d.ts +0 -4
@@ -45,11 +45,6 @@ export var messages = defineMessages({
45
45
  defaultMessage: 'Suggestions will appear below as you type into the field',
46
46
  description: 'Describes what the search field does for screen reader users.'
47
47
  },
48
- searchLinkResults: {
49
- id: 'fabric.linkPicker.hyperlink.searchLinkResults',
50
- defaultMessage: '{count, plural, =0 {no results} one {# result} other {# results}} found',
51
- description: 'Announce search results for screen-reader users.'
52
- },
53
48
  linkAriaLabel: {
54
49
  id: 'fabric.linkPicker.hyperlink.linkAriaLabel',
55
50
  defaultMessage: 'Link label',
@@ -69,50 +64,5 @@ export var messages = defineMessages({
69
64
  id: 'fabric.linkPicker.time.ago',
70
65
  defaultMessage: 'ago',
71
66
  description: 'Some time ago'
72
- },
73
- titleRecentlyViewed: {
74
- id: 'fabric.linkPicker.listTitle.recentlyViewed',
75
- defaultMessage: 'Recently Viewed',
76
- description: 'Describes type of items shown in the list for screen-reader users'
77
- },
78
- titleResults: {
79
- id: 'fabric.linkPicker.listTitle.results',
80
- defaultMessage: 'Results',
81
- description: 'Describes type of items shown in the list for screen-reader users'
82
- },
83
- cancelButton: {
84
- id: 'fabric.linkPicker.button.cancel',
85
- defaultMessage: 'Cancel',
86
- description: 'Button to cancel and dismiss the link picker'
87
- },
88
- insertButton: {
89
- id: 'fabric.linkPicker.button.insert',
90
- defaultMessage: 'Insert',
91
- description: 'Button to insert searched or selected link'
92
- },
93
- noResults: {
94
- id: 'fabric.linkPicker.search.noResults.heading',
95
- defaultMessage: 'We couldn’t find anything matching your search.',
96
- description: 'Heading message shown when a search has no results'
97
- },
98
- noResultsDescription: {
99
- id: 'fabric.linkPicker.search.noResults.description',
100
- defaultMessage: 'Try again with a different term.',
101
- description: 'Describes possible action when a search returns no results'
102
- },
103
- saveButton: {
104
- id: 'fabric.linkPicker.button.save',
105
- defaultMessage: 'Save',
106
- description: 'Button to save edited link'
107
- },
108
- searchErrorHeader: {
109
- id: 'fabric.linkPicker.search.error.heading',
110
- defaultMessage: 'We’re having trouble loading data.',
111
- description: 'Heading message shown when a search throws an error'
112
- },
113
- searchErrorDescription: {
114
- id: 'fabric.linkPicker.search.error.description',
115
- defaultMessage: 'Refresh the page, or contact <a>Atlassian Support</a> if this keeps happening.',
116
- description: 'Describes possible actions when search throws an error'
117
67
  }
118
68
  });
@@ -1,18 +1,21 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
4
4
 
5
5
  import { token } from '@atlaskit/tokens';
6
6
  import { css } from '@emotion/react';
7
- import { N500 } from '@atlaskit/theme/colors'; // AFP-2532 TODO: Fix automatic suppressions below
8
- // eslint-disable-next-line @atlassian/tangerine/import/entry-points
9
-
10
- import { typography } from '@atlaskit/theme';
11
- import { gridSize } from '@atlaskit/theme/constants';
7
+ import { N500 } from '@atlaskit/theme/colors';
8
+ import { gridSize as getGridSize } from '@atlaskit/theme/constants';
12
9
  var LINK_PICKER_WIDTH_IN_PX = 342;
13
- var LINK_PICKER_MIN_HEIGHT_IN_PX = 234;
14
- export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n line-height: initial;\n min-height: ", "px;\n"])), LINK_PICKER_WIDTH_IN_PX, gridSize() * 2, LINK_PICKER_MIN_HEIGHT_IN_PX);
10
+ var LINK_PICKER_MIN_HEIGHT_IN_PX = 220;
11
+ var gridSize = getGridSize();
12
+ /**
13
+ * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
14
+ */
15
+
16
+ export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n padding: ", "px ", "px ", "px;\n box-sizing: border-box;\n line-height: initial;\n min-height: ", "px;\n"])), LINK_PICKER_WIDTH_IN_PX, gridSize, gridSize * 2, gridSize * 2, LINK_PICKER_MIN_HEIGHT_IN_PX);
15
17
  export var rootContainerStylesForLoader = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: flex;\n align-items: center;\n justify-content: center;\n"])), rootContainerStyles);
16
- export var searchIconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n color: ", ";\n cursor: default;\n"])), gridSize() / 2, token('color.icon', N500));
17
- export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), typography.h100(), gridSize() / 2);
18
- export var tabsWrapperStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -", "px;\n margin-right: -", "px;\n"])), gridSize(), gridSize());
18
+ export var searchIconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n color: ", ";\n cursor: default;\n"])), gridSize / 2, token('color.icon', N500));
19
+ export var tabsWrapperStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n margin-left: -", "px;\n margin-right: -", "px;\n"])), gridSize * 1.5, gridSize, gridSize);
20
+ export var flexColumnStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
21
+ export var formFooterMargin = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n"])), gridSize * 2);
@@ -7,4 +7,4 @@ import { css } from '@emotion/react';
7
7
  import { N500 } from '@atlaskit/theme/colors';
8
8
  import { gridSize } from '@atlaskit/theme/constants';
9
9
  export var clearTextButtonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0;\n margin-right: ", "px;\n color: ", ";\n background: transparent;\n border: none;\n cursor: pointer;\n"])), gridSize() / 2, token('color.icon.subtle', N500));
10
- export var fieldStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n"])), gridSize() * 2);
10
+ export var fieldStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & + & {\n margin-top: ", "px;\n }\n"])), gridSize() * 2);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.8.2",
3
+ "version": "1.8.5",
4
4
  "sideEffects": false
5
5
  }
@@ -3,12 +3,15 @@
3
3
  *
4
4
  * Generates analytics utilities from the package analytics spec yaml
5
5
  *
6
- * @codegen <<SignedSource::ffa7ec78cc793f941d06cdb25b07dc8a>>
6
+ * @codegen <<SignedSource::115bafba068f36f76da67200ee2d08c4>>
7
7
  * @codegenCommand yarn workspace @atlaskit/link-picker run codegen-analytics
8
8
  */
9
- declare type FormSubmittedLinkPickerAttributesType = {};
10
- declare type InlineDialogViewedLinkPickerAttributesType = {};
11
- declare type InlineDialogClosedLinkPickerAttributesType = {};
9
+ export declare type LinkPickerAnalyticsContextType = {
10
+ linkState: 'editLink' | 'newLink';
11
+ };
12
+ export declare type FormSubmittedLinkPickerAttributesType = {};
13
+ export declare type InlineDialogViewedLinkPickerAttributesType = {};
14
+ export declare type InlineDialogClosedLinkPickerAttributesType = {};
12
15
  declare type AnalyticsEventAttributes = {
13
16
  'ui.form.submitted.linkPicker': FormSubmittedLinkPickerAttributesType;
14
17
  'ui.inlineDialog.viewed.linkPicker': InlineDialogViewedLinkPickerAttributesType;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const useFixHeight: (shouldFixHeight: boolean) => {
3
+ ref: import("react").RefObject<HTMLDivElement>;
4
+ style: {
5
+ minHeight: string | number;
6
+ } | undefined;
7
+ };
8
+ export default useFixHeight;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { LinkSearchListItemData } from '../../ui/types';
3
+ export interface PluginState {
4
+ items: LinkSearchListItemData[] | null;
5
+ error: unknown | null;
6
+ isLoading: boolean;
7
+ }
8
+ export declare const ACTION_CLEAR = "CLEAR";
9
+ export declare const ACTION_LOADING = "LOADING";
10
+ export declare const ACTION_SUCCESS = "SUCCESS";
11
+ export declare const ACTION_ERRORED = "ERROR";
12
+ interface ClearAction {
13
+ type: typeof ACTION_CLEAR;
14
+ }
15
+ interface ResolveLoadingAction {
16
+ type: typeof ACTION_LOADING;
17
+ }
18
+ interface ResolveSuccessAction {
19
+ type: typeof ACTION_SUCCESS;
20
+ payload: Pick<PluginState, 'items' | 'isLoading'>;
21
+ }
22
+ interface ResolveErrorAction {
23
+ type: typeof ACTION_ERRORED;
24
+ payload: PluginState['error'];
25
+ }
26
+ export declare type ReducerAction = ClearAction | ResolveLoadingAction | ResolveSuccessAction | ResolveErrorAction;
27
+ export declare const INITIAL_STATE: PluginState;
28
+ export declare function reducer(state: PluginState, action: ReducerAction): PluginState;
29
+ export declare const usePluginReducer: () => [PluginState, import("react").Dispatch<ReducerAction>];
30
+ export {};
@@ -0,0 +1,18 @@
1
+ import { LinkPickerPlugin, LinkPickerState, ResolveResult } from '../../ui/types';
2
+ export declare class CancellationError extends Error {
3
+ }
4
+ export declare const cancellable: <T extends unknown>(promise: Promise<T>) => {
5
+ promise: Promise<T>;
6
+ cancel: () => void;
7
+ };
8
+ /**
9
+ * Wraps the resolve with a cancellation wrapper and makes promise + generator plugin resolves more compatible
10
+ * Calling cancel for generator plugin prevents it from yielding any further updates
11
+ */
12
+ export declare const resolvePluginUpdates: (plugin: LinkPickerPlugin, state: LinkPickerState) => {
13
+ cancel: () => void;
14
+ next: () => Promise<{
15
+ done?: boolean;
16
+ value: ResolveResult;
17
+ }>;
18
+ };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare function withLinkPickerAnalyticsContext<P extends {
3
+ url?: string;
4
+ }>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P>;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ export declare const testIds: {
5
+ readonly insertButton: "link-picker-insert-button";
6
+ readonly cancelButton: "link-picker-cancel-button";
7
+ };
8
+ interface FormFooterProps extends React.HTMLAttributes<HTMLElement> {
9
+ isEditing?: boolean;
10
+ onCancel?: () => void;
11
+ }
12
+ declare const _default: import("react").MemoExoticComponent<({ isEditing, onCancel, ...restProps }: FormFooterProps) => jsx.JSX.Element>;
13
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const formFooterStyles: import("@emotion/react").SerializedStyles;
@@ -1,24 +1,24 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { LinkInputType, LinkPickerPlugin } from '../types';
3
3
  export declare const RECENT_SEARCH_LIST_SIZE = 5;
4
4
  export declare const CONTACT_SUPPORT_LINK = "https://support.atlassian.com/contact/";
5
5
  export declare const testIds: {
6
- linkPicker: string;
7
- urlInputField: string;
8
- textInputField: string;
9
- searchIcon: string;
10
- insertButton: string;
11
- cancelButton: string;
12
- clearUrlButton: string;
13
- resultListTitle: string;
14
- emptyResultPage: string;
15
- searchResultList: string;
16
- searchResultItem: string;
17
- searchResultLoadingIndicator: string;
18
- urlError: string;
19
- tabList: string;
20
- tabItem: string;
21
- searchError: string;
6
+ readonly clearUrlButton: "clear-text";
7
+ readonly urlError: "link-error";
8
+ readonly tabList: "link-picker-tabs";
9
+ readonly tabItem: "link-picker-tab";
10
+ readonly resultListTitle: string;
11
+ readonly searchResultItem: string;
12
+ readonly searchResultList: string;
13
+ readonly searchResultLoadingIndicator: string;
14
+ readonly emptyResultPage: string;
15
+ readonly searchError: string;
16
+ readonly insertButton: "link-picker-insert-button";
17
+ readonly cancelButton: "link-picker-cancel-button";
18
+ readonly linkPicker: "link-picker";
19
+ readonly urlInputField: "link-url";
20
+ readonly textInputField: "link-text";
21
+ readonly searchIcon: "link-picker-search-icon";
22
22
  };
23
23
  interface Meta {
24
24
  /** Indicates how the link was picked. */
@@ -63,5 +63,5 @@ export interface PickerState {
63
63
  invalidUrl: boolean;
64
64
  activeTab: number;
65
65
  }
66
- declare function LinkPicker({ onSubmit, onCancel, onContentResize, plugins, url: initUrl, displayText: initDisplayText, }: LinkPickerProps): jsx.JSX.Element;
67
- export default LinkPicker;
66
+ declare const _default: import("react").ComponentType<LinkPickerProps>;
67
+ export default _default;
@@ -1,4 +1,20 @@
1
- /// <reference types="react" />
2
- import { EmptyStateProps } from '@atlaskit/empty-state';
3
- declare const LinkSearchError: (props: EmptyStateProps) => JSX.Element;
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const CONTACT_SUPPORT_LINK = "https://support.atlassian.com/contact/";
4
+ export declare const messages: {
5
+ searchErrorHeader: {
6
+ id: string;
7
+ defaultMessage: string;
8
+ description: string;
9
+ };
10
+ searchErrorDescription: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ description: string;
14
+ };
15
+ };
16
+ export declare const testIds: {
17
+ searchError: string;
18
+ };
19
+ declare const LinkSearchError: () => jsx.JSX.Element;
4
20
  export default LinkSearchError;
@@ -1,8 +1,31 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
3
2
  import { LinkSearchListItemData } from '../../types';
4
- export interface LinkSearchListProps {
5
- items?: LinkSearchListItemData[];
3
+ export declare const messages: {
4
+ titleRecentlyViewed: {
5
+ id: string;
6
+ defaultMessage: string;
7
+ description: string;
8
+ };
9
+ titleResults: {
10
+ id: string;
11
+ defaultMessage: string;
12
+ description: string;
13
+ };
14
+ searchLinkResults: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ description: string;
18
+ };
19
+ };
20
+ export declare const testIds: {
21
+ resultListTitle: string;
22
+ searchResultItem: string;
23
+ searchResultList: string;
24
+ searchResultLoadingIndicator: string;
25
+ emptyResultPage: string;
26
+ };
27
+ export interface LinkSearchListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect' | 'onMouseEnter' | 'onMouseLeave'> {
28
+ items?: LinkSearchListItemData[] | null;
6
29
  isLoading: boolean;
7
30
  selectedIndex: number;
8
31
  activeIndex: number;
@@ -13,6 +36,8 @@ export interface LinkSearchListProps {
13
36
  ariaLabelledBy?: string;
14
37
  role?: string;
15
38
  id?: string;
39
+ error?: unknown;
40
+ hasSearchTerm?: boolean;
16
41
  }
17
- declare const LinkSearchList: ({ onSelect, onMouseEnter, onMouseLeave, items, activeIndex, selectedIndex, isLoading, ariaControls, ariaLabelledBy, role, id, }: LinkSearchListProps) => jsx.JSX.Element;
42
+ declare const LinkSearchList: import("react").ForwardRefExoticComponent<LinkSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
18
43
  export default LinkSearchList;
@@ -0,0 +1,19 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const messages: {
4
+ noResults: {
5
+ id: string;
6
+ defaultMessage: string;
7
+ description: string;
8
+ };
9
+ noResultsDescription: {
10
+ id: string;
11
+ defaultMessage: string;
12
+ description: string;
13
+ };
14
+ };
15
+ export declare const testIds: {
16
+ emptyResultPage: string;
17
+ };
18
+ declare const NoResults: () => jsx.JSX.Element;
19
+ export default NoResults;
@@ -0,0 +1 @@
1
+ export declare const emptyStateWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -1,3 +1,4 @@
1
1
  export declare const listContainerStyles: import("@emotion/react").SerializedStyles;
2
2
  export declare const spinnerContainerStyles: import("@emotion/react").SerializedStyles;
3
3
  export declare const listStyles: import("@emotion/react").SerializedStyles;
4
+ export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
@@ -44,11 +44,6 @@ export declare const messages: {
44
44
  defaultMessage: string;
45
45
  description: string;
46
46
  };
47
- searchLinkResults: {
48
- id: string;
49
- defaultMessage: string;
50
- description: string;
51
- };
52
47
  linkAriaLabel: {
53
48
  id: string;
54
49
  defaultMessage: string;
@@ -69,49 +64,4 @@ export declare const messages: {
69
64
  defaultMessage: string;
70
65
  description: string;
71
66
  };
72
- titleRecentlyViewed: {
73
- id: string;
74
- defaultMessage: string;
75
- description: string;
76
- };
77
- titleResults: {
78
- id: string;
79
- defaultMessage: string;
80
- description: string;
81
- };
82
- cancelButton: {
83
- id: string;
84
- defaultMessage: string;
85
- description: string;
86
- };
87
- insertButton: {
88
- id: string;
89
- defaultMessage: string;
90
- description: string;
91
- };
92
- noResults: {
93
- id: string;
94
- defaultMessage: string;
95
- description: string;
96
- };
97
- noResultsDescription: {
98
- id: string;
99
- defaultMessage: string;
100
- description: string;
101
- };
102
- saveButton: {
103
- id: string;
104
- defaultMessage: string;
105
- description: string;
106
- };
107
- searchErrorHeader: {
108
- id: string;
109
- defaultMessage: string;
110
- description: string;
111
- };
112
- searchErrorDescription: {
113
- id: string;
114
- defaultMessage: string;
115
- description: string;
116
- };
117
67
  };
@@ -1,5 +1,9 @@
1
+ /**
2
+ * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
3
+ */
1
4
  export declare const rootContainerStyles: import("@emotion/react").SerializedStyles;
2
5
  export declare const rootContainerStylesForLoader: import("@emotion/react").SerializedStyles;
3
6
  export declare const searchIconStyles: import("@emotion/react").SerializedStyles;
4
- export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
5
7
  export declare const tabsWrapperStyles: import("@emotion/react").SerializedStyles;
8
+ export declare const flexColumnStyles: import("@emotion/react").SerializedStyles;
9
+ export declare const formFooterMargin: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.8.2",
3
+ "version": "1.8.5",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -32,16 +32,16 @@
32
32
  "dependencies": {
33
33
  "@atlaskit/analytics-next": "^8.3.1",
34
34
  "@atlaskit/button": "^16.2.0",
35
- "@atlaskit/empty-state": "^7.3.0",
35
+ "@atlaskit/empty-state": "^7.4.0",
36
36
  "@atlaskit/form": "^8.5.1",
37
37
  "@atlaskit/icon": "^21.10.0",
38
38
  "@atlaskit/spinner": "^15.1.0",
39
- "@atlaskit/tabs": "^13.2.11",
40
- "@atlaskit/textfield": "^5.1.7",
41
- "@atlaskit/theme": "^12.1.0",
39
+ "@atlaskit/tabs": "^13.3.0",
40
+ "@atlaskit/textfield": "^5.2.0",
41
+ "@atlaskit/theme": "^12.2.0",
42
42
  "@atlaskit/tokens": "^0.10.0",
43
43
  "@atlaskit/tooltip": "^17.5.0",
44
- "@atlaskit/visually-hidden": "^1.0.0",
44
+ "@atlaskit/visually-hidden": "^1.1.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@emotion/react": "^11.7.1",
47
47
  "date-fns": "^2.17.0",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/link-test-helpers": "^1.4.0",
60
60
  "@atlaskit/popup": "^1.4.0",
61
61
  "@atlaskit/ssr": "*",
62
- "@atlaskit/toggle": "^12.4.0",
62
+ "@atlaskit/toggle": "^12.5.0",
63
63
  "@atlaskit/visual-regression": "*",
64
64
  "@atlaskit/webdriver-runner": "*",
65
65
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
@@ -67,11 +67,11 @@
67
67
  "@atlassian/link-picker-plugins": "^5.1.0",
68
68
  "@atlassian/recent-work-client": "^1.6.0",
69
69
  "@atlassian/search-provider": "^2.3.0",
70
- "@testing-library/dom": "^7.7.3",
71
- "@testing-library/jest-dom": "^4.1.0",
72
- "@testing-library/react": "^8.0.1",
73
- "@testing-library/react-hooks": "^1.0.4",
74
- "@testing-library/user-event": "10.4.0",
70
+ "@testing-library/dom": "^8.17.1",
71
+ "@testing-library/jest-dom": "^5.16.5",
72
+ "@testing-library/react": "^12.1.5",
73
+ "@testing-library/react-hooks": "^1.1.0",
74
+ "@testing-library/user-event": "^13.5.0",
75
75
  "@types/js-yaml": "^3.12.5",
76
76
  "enzyme": "^3.10.0",
77
77
  "fetch-mock": "^8.0.0",
package/report.api.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
6
 
7
7
  ```ts
8
+ /// <reference types="react" />
9
+
8
10
  import { MessageDescriptor } from 'react-intl-next';
9
11
  import { default as React_2 } from 'react';
10
12
  import { ReactNode } from 'react';
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
15
-
16
- var _noResultsSvg = _interopRequireDefault(require("./no-results-svg"));
17
-
18
- var NoResults = function NoResults(props) {
19
- return /*#__PURE__*/_react.default.createElement(_emptyState.default, (0, _extends2.default)({}, props, {
20
- renderImage: function renderImage() {
21
- return /*#__PURE__*/_react.default.createElement(_noResultsSvg.default, null);
22
- }
23
- }));
24
- };
25
-
26
- var _default = NoResults;
27
- exports.default = _default;
@@ -1,10 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import EmptyState from '@atlaskit/empty-state';
4
- import NoResultsSVG from './no-results-svg';
5
-
6
- const NoResults = props => /*#__PURE__*/React.createElement(EmptyState, _extends({}, props, {
7
- renderImage: () => /*#__PURE__*/React.createElement(NoResultsSVG, null)
8
- }));
9
-
10
- export default NoResults;
@@ -1,14 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import EmptyState from '@atlaskit/empty-state';
4
- import NoResultsSVG from './no-results-svg';
5
-
6
- var NoResults = function NoResults(props) {
7
- return /*#__PURE__*/React.createElement(EmptyState, _extends({}, props, {
8
- renderImage: function renderImage() {
9
- return /*#__PURE__*/React.createElement(NoResultsSVG, null);
10
- }
11
- }));
12
- };
13
-
14
- export default NoResults;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { EmptyStateProps } from '@atlaskit/empty-state';
3
- declare const NoResults: (props: EmptyStateProps) => JSX.Element;
4
- export default NoResults;