@atlaskit/link-picker 1.34.2 → 1.34.3

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 (22) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/common/ui/empty-state/index.js +32 -0
  3. package/dist/cjs/ui/error-boundary/error-boundary-fallback/index.js +4 -2
  4. package/dist/cjs/ui/index.js +1 -1
  5. package/dist/cjs/ui/link-picker/search-results/link-search-error/index.js +4 -1
  6. package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -2
  7. package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js +8 -5
  8. package/dist/es2019/common/ui/empty-state/index.js +26 -0
  9. package/dist/es2019/ui/error-boundary/error-boundary-fallback/index.js +4 -2
  10. package/dist/es2019/ui/index.js +1 -1
  11. package/dist/es2019/ui/link-picker/search-results/link-search-error/index.js +4 -1
  12. package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -2
  13. package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js +7 -7
  14. package/dist/esm/common/ui/empty-state/index.js +25 -0
  15. package/dist/esm/ui/error-boundary/error-boundary-fallback/index.js +4 -2
  16. package/dist/esm/ui/index.js +1 -1
  17. package/dist/esm/ui/link-picker/search-results/link-search-error/index.js +4 -1
  18. package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -2
  19. package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/styled.js +8 -4
  20. package/dist/types/common/ui/empty-state/index.d.ts +9 -0
  21. package/dist/types-ts4.5/common/ui/empty-state/index.d.ts +9 -0
  22. package/package.json +6 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.34.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#81158](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81158) [`d08a50c6d90b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d08a50c6d90b) - Updates empty states to no longer use the `@atlaskit/empty-state` component in order to leverage Heading Provider from `@atlaskit/heading`, behind ff
8
+
3
9
  ## 1.34.2
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.EmptyState = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
10
+ var _primitives = require("@atlaskit/primitives");
11
+ var EmptyState = exports.EmptyState = function EmptyState(_ref) {
12
+ var testId = _ref.testId,
13
+ header = _ref.header,
14
+ description = _ref.description,
15
+ renderImage = _ref.renderImage;
16
+ return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
17
+ xcss: (0, _primitives.xcss)({
18
+ marginBlockStart: 'space.600',
19
+ marginBlockEnd: 'space.600',
20
+ textAlign: 'center'
21
+ }),
22
+ testId: testId,
23
+ direction: "column",
24
+ alignItems: "center",
25
+ gap: "space.100"
26
+ }, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/_react.default.createElement(_heading.default, {
27
+ variant: "medium"
28
+ }, header), description && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
29
+ as: "p",
30
+ color: 'color.text'
31
+ }, description));
32
+ };
@@ -11,6 +11,7 @@ var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
12
  var _constants = require("../../../common/constants");
13
13
  var _genericErrorSvg = require("../../../common/generic-error-svg");
14
+ var _emptyState2 = require("../../../common/ui/empty-state");
14
15
  var _minHeightContainer = require("../../../common/ui/min-height-container");
15
16
  var _styled = require("../../link-picker/styled");
16
17
  var _styled2 = require("./styled");
@@ -34,12 +35,13 @@ var ErrorBoundaryFallback = exports.ErrorBoundaryFallback = function ErrorBounda
34
35
  var intl = (0, _reactIntlNext.useIntl)();
35
36
  var header = intl.formatMessage(messages.heading);
36
37
  var description = intl.formatMessage(messages.description);
38
+ var EmptyStateComponent = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.remove-dst-empty-state') ? _emptyState2.EmptyState : _emptyState.default;
37
39
  if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results')) {
38
40
  return (0, _react.jsx)(_minHeightContainer.MinHeightContainer, {
39
41
  css: _styled2.errorBoundaryFallbackStyles,
40
42
  minHeight: _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
41
43
  "data-testid": "link-picker-root-error-boundary-ui"
42
- }, (0, _react.jsx)(_emptyState.default, {
44
+ }, (0, _react.jsx)(EmptyStateComponent, {
43
45
  header: header,
44
46
  renderImage: function renderImage() {
45
47
  return (0, _react.jsx)(_genericErrorSvg.GenericErrorSVG, null);
@@ -50,7 +52,7 @@ var ErrorBoundaryFallback = exports.ErrorBoundaryFallback = function ErrorBounda
50
52
  return (0, _react.jsx)("div", {
51
53
  css: _styled.rootContainerStyles,
52
54
  "data-testid": "link-picker-root-error-boundary-ui"
53
- }, (0, _react.jsx)(_emptyState.default, {
55
+ }, (0, _react.jsx)(EmptyStateComponent, {
54
56
  header: header,
55
57
  renderImage: function renderImage() {
56
58
  return (0, _react.jsx)(_genericErrorSvg.GenericErrorSVG, null);
@@ -26,7 +26,7 @@ var testIds = exports.testIds = {
26
26
  };
27
27
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
28
28
  packageName: "@atlaskit/link-picker" || '',
29
- packageVersion: "1.34.2" || '',
29
+ packageVersion: "1.34.3" || '',
30
30
  componentName: _constants.COMPONENT_NAME,
31
31
  source: _constants.COMPONENT_NAME
32
32
  };
@@ -10,7 +10,9 @@ var _react = require("@emotion/react");
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _button = _interopRequireDefault(require("@atlaskit/button"));
12
12
  var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
14
  var _genericErrorSvg = require("../../../../common/generic-error-svg");
15
+ var _emptyState2 = require("../../../../common/ui/empty-state");
14
16
  /** @jsx jsx */
15
17
 
16
18
  var CONTACT_SUPPORT_LINK = exports.CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
@@ -31,7 +33,8 @@ var testIds = exports.testIds = {
31
33
  };
32
34
  var LinkSearchError = exports.LinkSearchError = function LinkSearchError() {
33
35
  var intl = (0, _reactIntlNext.useIntl)();
34
- return (0, _react.jsx)(_emptyState.default, {
36
+ var Component = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.remove-dst-empty-state') ? _emptyState2.EmptyState : _emptyState.default;
37
+ return (0, _react.jsx)(Component, {
35
38
  testId: testIds.searchError,
36
39
  header: intl.formatMessage(messages.searchErrorHeader),
37
40
  description: (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, messages.searchErrorDescription, {
@@ -8,6 +8,8 @@ exports.testIds = exports.messages = exports.NoResults = void 0;
8
8
  var _react = require("@emotion/react");
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _emptyState2 = require("../../../../../common/ui/empty-state");
11
13
  var _noResultsSvg = require("./no-results-svg");
12
14
  var _styled = require("./styled");
13
15
  /** @jsx jsx */
@@ -29,12 +31,13 @@ var testIds = exports.testIds = {
29
31
  };
30
32
  var NoResults = exports.NoResults = function NoResults() {
31
33
  var intl = (0, _reactIntlNext.useIntl)();
34
+ var Component = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.remove-dst-empty-state') ? _emptyState2.EmptyState : _emptyState.default;
32
35
  return (0, _react.jsx)("div", {
33
36
  css: _styled.emptyStateWrapperStyles
34
- }, (0, _react.jsx)(_emptyState.default, {
37
+ }, (0, _react.jsx)(Component, {
35
38
  testId: testIds.emptyResultPage,
36
39
  header: intl.formatMessage(messages.noResults),
37
- headingLevel: 3,
40
+ headingLevel: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.remove-dst-empty-state') ? undefined : 3,
38
41
  description: intl.formatMessage(messages.noResultsDescription),
39
42
  renderImage: function renderImage() {
40
43
  return (0, _react.jsx)(_noResultsSvg.NoResultsSVG, null);
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.emptyStateWrapperStyles = exports.emptyStateNoResultsWrapper = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
7
  var _react = require("@emotion/react");
10
- var _templateObject, _templateObject2;
11
- var emptyStateWrapperStyles = exports.emptyStateWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & p {\n margin: 0;\n }\n"])));
12
- var emptyStateNoResultsWrapper = exports.emptyStateNoResultsWrapper = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n min-height: ", ";\n"])), "var(--ds-space-200, 16px)");
8
+ var emptyStateWrapperStyles = exports.emptyStateWrapperStyles = (0, _react.css)({
9
+ '& p': {
10
+ margin: 0
11
+ }
12
+ });
13
+ var emptyStateNoResultsWrapper = exports.emptyStateNoResultsWrapper = (0, _react.css)({
14
+ minHeight: "var(--ds-space-200, 16px)"
15
+ });
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import Heading from '@atlaskit/heading';
3
+ import { Box, Flex, xcss } from '@atlaskit/primitives';
4
+ export const EmptyState = ({
5
+ testId,
6
+ header,
7
+ description,
8
+ renderImage
9
+ }) => {
10
+ return /*#__PURE__*/React.createElement(Flex, {
11
+ xcss: xcss({
12
+ marginBlockStart: 'space.600',
13
+ marginBlockEnd: 'space.600',
14
+ textAlign: 'center'
15
+ }),
16
+ testId: testId,
17
+ direction: "column",
18
+ alignItems: "center",
19
+ gap: "space.100"
20
+ }, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Heading, {
21
+ variant: "medium"
22
+ }, header), description && /*#__PURE__*/React.createElement(Box, {
23
+ as: "p",
24
+ color: 'color.text'
25
+ }, description));
26
+ };
@@ -5,6 +5,7 @@ import EmptyState from '@atlaskit/empty-state';
5
5
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
6
  import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
7
7
  import { GenericErrorSVG } from '../../../common/generic-error-svg';
8
+ import { EmptyState as EmptyStateInternal } from '../../../common/ui/empty-state';
8
9
  import { MinHeightContainer } from '../../../common/ui/min-height-container';
9
10
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
10
11
  import { rootContainerStyles } from '../../link-picker/styled';
@@ -25,12 +26,13 @@ export const ErrorBoundaryFallback = () => {
25
26
  const intl = useIntl();
26
27
  const header = intl.formatMessage(messages.heading);
27
28
  const description = intl.formatMessage(messages.description);
29
+ const EmptyStateComponent = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
28
30
  if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
29
31
  return jsx(MinHeightContainer, {
30
32
  css: errorBoundaryFallbackStyles,
31
33
  minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
32
34
  "data-testid": "link-picker-root-error-boundary-ui"
33
- }, jsx(EmptyState, {
35
+ }, jsx(EmptyStateComponent, {
34
36
  header: header,
35
37
  renderImage: () => jsx(GenericErrorSVG, null),
36
38
  description: description
@@ -39,7 +41,7 @@ export const ErrorBoundaryFallback = () => {
39
41
  return jsx("div", {
40
42
  css: rootContainerStyles,
41
43
  "data-testid": "link-picker-root-error-boundary-ui"
42
- }, jsx(EmptyState, {
44
+ }, jsx(EmptyStateComponent, {
43
45
  header: header,
44
46
  renderImage: () => jsx(GenericErrorSVG, null),
45
47
  description: description
@@ -16,7 +16,7 @@ export const testIds = {
16
16
  };
17
17
  export const PACKAGE_DATA = {
18
18
  packageName: "@atlaskit/link-picker" || '',
19
- packageVersion: "1.34.2" || '',
19
+ packageVersion: "1.34.3" || '',
20
20
  componentName: COMPONENT_NAME,
21
21
  source: COMPONENT_NAME
22
22
  };
@@ -4,7 +4,9 @@ import { jsx } from '@emotion/react';
4
4
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
5
5
  import Button from '@atlaskit/button';
6
6
  import EmptyState from '@atlaskit/empty-state';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
8
  import { GenericErrorSVG } from '../../../../common/generic-error-svg';
9
+ import { EmptyState as EmptyStateInternal } from '../../../../common/ui/empty-state';
8
10
  export const CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
9
11
  export const messages = defineMessages({
10
12
  searchErrorHeader: {
@@ -23,7 +25,8 @@ export const testIds = {
23
25
  };
24
26
  export const LinkSearchError = () => {
25
27
  const intl = useIntl();
26
- return jsx(EmptyState, {
28
+ const Component = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
29
+ return jsx(Component, {
27
30
  testId: testIds.searchError,
28
31
  header: intl.formatMessage(messages.searchErrorHeader),
29
32
  description: jsx(FormattedMessage, _extends({}, messages.searchErrorDescription, {
@@ -2,6 +2,8 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { defineMessages, useIntl } from 'react-intl-next';
4
4
  import EmptyState from '@atlaskit/empty-state';
5
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { EmptyState as EmptyStateInternal } from '../../../../../common/ui/empty-state';
5
7
  import { NoResultsSVG } from './no-results-svg';
6
8
  import { emptyStateWrapperStyles } from './styled';
7
9
  export const messages = defineMessages({
@@ -21,12 +23,13 @@ export const testIds = {
21
23
  };
22
24
  export const NoResults = () => {
23
25
  const intl = useIntl();
26
+ const Component = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
24
27
  return jsx("div", {
25
28
  css: emptyStateWrapperStyles
26
- }, jsx(EmptyState, {
29
+ }, jsx(Component, {
27
30
  testId: testIds.emptyResultPage,
28
31
  header: intl.formatMessage(messages.noResults),
29
- headingLevel: 3,
32
+ headingLevel: getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? undefined : 3,
30
33
  description: intl.formatMessage(messages.noResultsDescription),
31
34
  renderImage: () => jsx(NoResultsSVG, null)
32
35
  }));
@@ -1,9 +1,9 @@
1
1
  import { css } from '@emotion/react';
2
- export const emptyStateWrapperStyles = css`
3
- & p {
4
- margin: 0;
2
+ export const emptyStateWrapperStyles = css({
3
+ '& p': {
4
+ margin: 0
5
5
  }
6
- `;
7
- export const emptyStateNoResultsWrapper = css`
8
- min-height: ${"var(--ds-space-200, 16px)"};
9
- `;
6
+ });
7
+ export const emptyStateNoResultsWrapper = css({
8
+ minHeight: "var(--ds-space-200, 16px)"
9
+ });
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import Heading from '@atlaskit/heading';
3
+ import { Box, Flex, xcss } from '@atlaskit/primitives';
4
+ export var EmptyState = function EmptyState(_ref) {
5
+ var testId = _ref.testId,
6
+ header = _ref.header,
7
+ description = _ref.description,
8
+ renderImage = _ref.renderImage;
9
+ return /*#__PURE__*/React.createElement(Flex, {
10
+ xcss: xcss({
11
+ marginBlockStart: 'space.600',
12
+ marginBlockEnd: 'space.600',
13
+ textAlign: 'center'
14
+ }),
15
+ testId: testId,
16
+ direction: "column",
17
+ alignItems: "center",
18
+ gap: "space.100"
19
+ }, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Heading, {
20
+ variant: "medium"
21
+ }, header), description && /*#__PURE__*/React.createElement(Box, {
22
+ as: "p",
23
+ color: 'color.text'
24
+ }, description));
25
+ };
@@ -5,6 +5,7 @@ import EmptyState from '@atlaskit/empty-state';
5
5
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
6
  import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
7
7
  import { GenericErrorSVG } from '../../../common/generic-error-svg';
8
+ import { EmptyState as EmptyStateInternal } from '../../../common/ui/empty-state';
8
9
  import { MinHeightContainer } from '../../../common/ui/min-height-container';
9
10
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
10
11
  import { rootContainerStyles } from '../../link-picker/styled';
@@ -25,12 +26,13 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
25
26
  var intl = useIntl();
26
27
  var header = intl.formatMessage(messages.heading);
27
28
  var description = intl.formatMessage(messages.description);
29
+ var EmptyStateComponent = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
28
30
  if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
29
31
  return jsx(MinHeightContainer, {
30
32
  css: errorBoundaryFallbackStyles,
31
33
  minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
32
34
  "data-testid": "link-picker-root-error-boundary-ui"
33
- }, jsx(EmptyState, {
35
+ }, jsx(EmptyStateComponent, {
34
36
  header: header,
35
37
  renderImage: function renderImage() {
36
38
  return jsx(GenericErrorSVG, null);
@@ -41,7 +43,7 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
41
43
  return jsx("div", {
42
44
  css: rootContainerStyles,
43
45
  "data-testid": "link-picker-root-error-boundary-ui"
44
- }, jsx(EmptyState, {
46
+ }, jsx(EmptyStateComponent, {
45
47
  header: header,
46
48
  renderImage: function renderImage() {
47
49
  return jsx(GenericErrorSVG, null);
@@ -17,7 +17,7 @@ export var testIds = {
17
17
  };
18
18
  export var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/link-picker" || '',
20
- packageVersion: "1.34.2" || '',
20
+ packageVersion: "1.34.3" || '',
21
21
  componentName: COMPONENT_NAME,
22
22
  source: COMPONENT_NAME
23
23
  };
@@ -4,7 +4,9 @@ import { jsx } from '@emotion/react';
4
4
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
5
5
  import Button from '@atlaskit/button';
6
6
  import EmptyState from '@atlaskit/empty-state';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
8
  import { GenericErrorSVG } from '../../../../common/generic-error-svg';
9
+ import { EmptyState as EmptyStateInternal } from '../../../../common/ui/empty-state';
8
10
  export var CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
9
11
  export var messages = defineMessages({
10
12
  searchErrorHeader: {
@@ -23,7 +25,8 @@ export var testIds = {
23
25
  };
24
26
  export var LinkSearchError = function LinkSearchError() {
25
27
  var intl = useIntl();
26
- return jsx(EmptyState, {
28
+ var Component = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
29
+ return jsx(Component, {
27
30
  testId: testIds.searchError,
28
31
  header: intl.formatMessage(messages.searchErrorHeader),
29
32
  description: jsx(FormattedMessage, _extends({}, messages.searchErrorDescription, {
@@ -2,6 +2,8 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { defineMessages, useIntl } from 'react-intl-next';
4
4
  import EmptyState from '@atlaskit/empty-state';
5
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { EmptyState as EmptyStateInternal } from '../../../../../common/ui/empty-state';
5
7
  import { NoResultsSVG } from './no-results-svg';
6
8
  import { emptyStateWrapperStyles } from './styled';
7
9
  export var messages = defineMessages({
@@ -21,12 +23,13 @@ export var testIds = {
21
23
  };
22
24
  export var NoResults = function NoResults() {
23
25
  var intl = useIntl();
26
+ var Component = getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? EmptyStateInternal : EmptyState;
24
27
  return jsx("div", {
25
28
  css: emptyStateWrapperStyles
26
- }, jsx(EmptyState, {
29
+ }, jsx(Component, {
27
30
  testId: testIds.emptyResultPage,
28
31
  header: intl.formatMessage(messages.noResults),
29
- headingLevel: 3,
32
+ headingLevel: getBooleanFF('platform.linking-platform.link-picker.remove-dst-empty-state') ? undefined : 3,
30
33
  description: intl.formatMessage(messages.noResultsDescription),
31
34
  renderImage: function renderImage() {
32
35
  return jsx(NoResultsSVG, null);
@@ -1,5 +1,9 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
1
  import { css } from '@emotion/react';
4
- export var emptyStateWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & p {\n margin: 0;\n }\n"])));
5
- export var emptyStateNoResultsWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-height: ", ";\n"])), "var(--ds-space-200, 16px)");
2
+ export var emptyStateWrapperStyles = css({
3
+ '& p': {
4
+ margin: 0
5
+ }
6
+ });
7
+ export var emptyStateNoResultsWrapper = css({
8
+ minHeight: "var(--ds-space-200, 16px)"
9
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type EmptyStateProps = {
3
+ header: string;
4
+ testId?: string;
5
+ description?: React.ReactNode;
6
+ renderImage?: () => React.ReactNode;
7
+ };
8
+ export declare const EmptyState: ({ testId, header, description, renderImage, }: EmptyStateProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type EmptyStateProps = {
3
+ header: string;
4
+ testId?: string;
5
+ description?: React.ReactNode;
6
+ renderImage?: () => React.ReactNode;
7
+ };
8
+ export declare const EmptyState: ({ testId, header, description, renderImage, }: EmptyStateProps) => JSX.Element;
9
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.34.2",
3
+ "version": "1.34.3",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -49,6 +49,9 @@
49
49
  },
50
50
  "platform.linking-platform.link-picker.use-onsubmitcapture": {
51
51
  "type": "boolean"
52
+ },
53
+ "platform.linking-platform.link-picker.remove-dst-empty-state": {
54
+ "type": "boolean"
52
55
  }
53
56
  },
54
57
  "scripts": {
@@ -61,11 +64,13 @@
61
64
  "@atlaskit/empty-state": "^7.7.0",
62
65
  "@atlaskit/form": "^9.0.3",
63
66
  "@atlaskit/frontend-utilities": "^2.7.0",
67
+ "@atlaskit/heading": "^1.6.0",
64
68
  "@atlaskit/icon": "^22.1.0",
65
69
  "@atlaskit/intl-messages-provider": "^1.0.2",
66
70
  "@atlaskit/linking-common": "^5.4.0",
67
71
  "@atlaskit/onboarding": "^11.2.0",
68
72
  "@atlaskit/platform-feature-flags": "^0.2.1",
73
+ "@atlaskit/primitives": "^4.1.0",
69
74
  "@atlaskit/spinner": "^16.0.0",
70
75
  "@atlaskit/tabs": "^14.0.0",
71
76
  "@atlaskit/textfield": "^6.1.0",
@@ -93,7 +98,6 @@
93
98
  "@atlaskit/dropdown-menu": "^12.8.0",
94
99
  "@atlaskit/link-provider": "^1.8.0",
95
100
  "@atlaskit/link-test-helpers": "^6.2.0",
96
- "@atlaskit/primitives": "^4.1.0",
97
101
  "@atlaskit/visual-regression": "*",
98
102
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
99
103
  "@atlassian/feature-flags-test-utils": "*",