@atlaskit/link-picker 1.25.6 → 1.26.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/common/constants.js +12 -2
  3. package/dist/cjs/common/ui/min-height-container/index.js +29 -0
  4. package/dist/cjs/common/ui/min-height-container/styled.js +12 -0
  5. package/dist/cjs/ui/error-boundary/error-boundary-fallback/index.js +17 -0
  6. package/dist/cjs/ui/error-boundary/error-boundary-fallback/styled.js +12 -0
  7. package/dist/cjs/ui/index.js +27 -9
  8. package/dist/cjs/ui/link-picker/styled.js +3 -3
  9. package/dist/cjs/ui/loader-fallback/index.js +25 -7
  10. package/dist/cjs/ui/styled.js +13 -0
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/common/constants.js +6 -1
  13. package/dist/es2019/common/ui/min-height-container/index.js +18 -0
  14. package/dist/es2019/common/ui/min-height-container/styled.js +7 -0
  15. package/dist/es2019/ui/error-boundary/error-boundary-fallback/index.js +15 -0
  16. package/dist/es2019/ui/error-boundary/error-boundary-fallback/styled.js +4 -0
  17. package/dist/es2019/ui/index.js +28 -9
  18. package/dist/es2019/ui/link-picker/styled.js +3 -2
  19. package/dist/es2019/ui/loader-fallback/index.js +31 -12
  20. package/dist/es2019/ui/styled.js +5 -0
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/common/constants.js +6 -1
  23. package/dist/esm/common/ui/min-height-container/index.js +18 -0
  24. package/dist/esm/common/ui/min-height-container/styled.js +4 -0
  25. package/dist/esm/ui/error-boundary/error-boundary-fallback/index.js +17 -0
  26. package/dist/esm/ui/error-boundary/error-boundary-fallback/styled.js +4 -0
  27. package/dist/esm/ui/index.js +28 -9
  28. package/dist/esm/ui/link-picker/styled.js +3 -2
  29. package/dist/esm/ui/loader-fallback/index.js +24 -7
  30. package/dist/esm/ui/styled.js +5 -0
  31. package/dist/esm/version.json +1 -1
  32. package/dist/types/common/constants.d.ts +5 -0
  33. package/dist/types/common/ui/min-height-container/index.d.ts +5 -0
  34. package/dist/types/common/ui/min-height-container/styled.d.ts +1 -0
  35. package/dist/types/ui/error-boundary/error-boundary-fallback/styled.d.ts +1 -0
  36. package/dist/types/ui/index.d.ts +3 -1
  37. package/dist/types/ui/loader-fallback/index.d.ts +8 -5
  38. package/dist/types/ui/styled.d.ts +1 -0
  39. package/dist/types-ts4.5/common/constants.d.ts +5 -0
  40. package/dist/types-ts4.5/common/ui/min-height-container/index.d.ts +5 -0
  41. package/dist/types-ts4.5/common/ui/min-height-container/styled.d.ts +1 -0
  42. package/dist/types-ts4.5/ui/error-boundary/error-boundary-fallback/styled.d.ts +1 -0
  43. package/dist/types-ts4.5/ui/index.d.ts +3 -1
  44. package/dist/types-ts4.5/ui/loader-fallback/index.d.ts +8 -5
  45. package/dist/types-ts4.5/ui/styled.d.ts +1 -0
  46. package/package.json +8 -9
  47. package/report.api.md +2 -1
  48. package/tmp/api-report-tmp.d.ts +2 -1
  49. package/dist/cjs/ui/loader-fallback/styled.js +0 -21
  50. package/dist/es2019/ui/loader-fallback/styled.js +0 -25
  51. package/dist/esm/ui/loader-fallback/styled.js +0 -16
  52. package/dist/types/ui/loader-fallback/styled.d.ts +0 -3
  53. package/dist/types-ts4.5/ui/loader-fallback/styled.d.ts +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ae65b485bca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae65b485bca) - [ux] Better minimum height for link picker error and loading state
8
+
3
9
  ## 1.25.6
4
10
 
5
11
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.RECENT_SEARCH_LIST_SIZE = exports.LINK_PICKER_WIDTH_IN_PX = exports.COMPONENT_NAME = exports.ANALYTICS_CHANNEL = void 0;
6
+ exports.RECENT_SEARCH_LIST_SIZE = exports.LINK_PICKER_WIDTH_IN_PX = exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = exports.LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = exports.COMPONENT_NAME = exports.ANALYTICS_CHANNEL = void 0;
7
7
  var ANALYTICS_CHANNEL = 'media';
8
8
  exports.ANALYTICS_CHANNEL = ANALYTICS_CHANNEL;
9
9
  var COMPONENT_NAME = 'linkPicker';
@@ -11,4 +11,14 @@ exports.COMPONENT_NAME = COMPONENT_NAME;
11
11
  var RECENT_SEARCH_LIST_SIZE = 5;
12
12
  exports.RECENT_SEARCH_LIST_SIZE = RECENT_SEARCH_LIST_SIZE;
13
13
  var LINK_PICKER_WIDTH_IN_PX = 342;
14
- exports.LINK_PICKER_WIDTH_IN_PX = LINK_PICKER_WIDTH_IN_PX;
14
+ exports.LINK_PICKER_WIDTH_IN_PX = LINK_PICKER_WIDTH_IN_PX;
15
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
16
+ exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT;
17
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
18
+ exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
19
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
20
+ exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
21
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
22
+ exports.LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT;
23
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = '290px';
24
+ exports.LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.MinHeightContainer = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _react2 = require("@emotion/react");
14
+ var _styled = require("./styled");
15
+ var _excluded = ["minHeight"];
16
+ /** @jsx jsx */
17
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+ var MinHeightContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
20
+ var minHeight = _ref.minHeight,
21
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
22
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
23
+ ref: ref,
24
+ css: _styled.minHeightComponentStyles
25
+ }, props, {
26
+ style: (0, _defineProperty2.default)({}, '--link-picker-min-height', minHeight)
27
+ }));
28
+ });
29
+ exports.MinHeightContainer = MinHeightContainer;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.minHeightComponentStyles = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _templateObject;
11
+ var minHeightComponentStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--link-picker-min-height);\n"])));
12
+ exports.minHeightComponentStyles = minHeightComponentStyles;
@@ -8,8 +8,12 @@ exports.ErrorBoundaryFallback = 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 _constants = require("../../../common/constants");
11
13
  var _genericErrorSvg = require("../../../common/generic-error-svg");
14
+ var _minHeightContainer = require("../../../common/ui/min-height-container");
12
15
  var _styled = require("../../link-picker/styled");
16
+ var _styled2 = require("./styled");
13
17
  /** @jsx jsx */
14
18
 
15
19
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
@@ -30,6 +34,19 @@ var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
30
34
  var intl = (0, _reactIntlNext.useIntl)();
31
35
  var header = intl.formatMessage(messages.heading);
32
36
  var description = intl.formatMessage(messages.description);
37
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results')) {
38
+ return (0, _react.jsx)(_minHeightContainer.MinHeightContainer, {
39
+ css: _styled2.errorBoundaryFallbackStyles,
40
+ minHeight: _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
41
+ "data-testid": "link-picker-root-error-boundary-ui"
42
+ }, (0, _react.jsx)(_emptyState.default, {
43
+ header: header,
44
+ renderImage: function renderImage() {
45
+ return (0, _react.jsx)(_genericErrorSvg.GenericErrorSVG, null);
46
+ },
47
+ description: description
48
+ }));
49
+ }
33
50
  return (0, _react.jsx)("div", {
34
51
  css: _styled.rootContainerStyles,
35
52
  "data-testid": "link-picker-root-error-boundary-ui"
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.errorBoundaryFallbackStyles = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _templateObject;
11
+ var errorBoundaryFallbackStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: initial;\n"])));
12
+ exports.errorBoundaryFallbackStyles = errorBoundaryFallbackStyles;
@@ -8,16 +8,19 @@ exports.testIds = exports.PACKAGE_DATA = exports.ComposedLinkPicker = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
+ var _react2 = require("@emotion/react");
11
12
  var _reactLooselyLazy = require("react-loosely-lazy");
12
13
  var _analyticsNext = require("@atlaskit/analytics-next");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
15
  var _constants = require("../common/constants");
14
16
  var _sessionProvider = require("../controllers/session-provider");
15
17
  var _version = require("../version.json");
16
18
  var _errorBoundary = require("./error-boundary");
17
19
  var _loaderFallback = require("./loader-fallback");
18
20
  var _messagesProvider = require("./messages-provider");
21
+ var _styled = require("./styled");
19
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /** @jsx jsx */
21
24
  var testIds = {
22
25
  linkPickerRoot: 'link-picker-root'
23
26
  };
@@ -42,21 +45,36 @@ var LazyLinkPicker = (0, _reactLooselyLazy.lazyForPaint)(function () {
42
45
  });
43
46
  var DefaultRootComponent = function DefaultRootComponent(_ref2) {
44
47
  var children = _ref2.children;
45
- return /*#__PURE__*/_react.default.createElement("div", {
48
+ return (0, _react2.jsx)("div", {
46
49
  "data-testid": testIds.linkPickerRoot
47
50
  }, children);
48
51
  };
52
+ var FixedWidthContainer = function FixedWidthContainer(props) {
53
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
54
+ css: _styled.fixedWidthContainerStyles
55
+ }, props));
56
+ };
49
57
  var ComposedLinkPicker = /*#__PURE__*/(0, _react.memo)(function (props) {
50
58
  var component = props.component;
51
59
  var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
52
- return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
60
+
61
+ /**
62
+ * When ff enabled: root container will provide width to component + loader + error boundary
63
+ * When ff disabled: component + loader + error boundary each providing their own width
64
+ * Cannot make this change easier at risk of regression as external adopters may have css override on the form element
65
+ */
66
+ var RootFixedWidthContainer = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : _react.Fragment;
67
+ var LoaderFallbackContainer = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results') ? _react.Fragment : FixedWidthContainer;
68
+ return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
53
69
  data: PACKAGE_DATA
54
- }, /*#__PURE__*/_react.default.createElement(_sessionProvider.LinkPickerSessionProvider, null, /*#__PURE__*/_react.default.createElement(_messagesProvider.MessagesProvider, null, /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, null, /*#__PURE__*/_react.default.createElement(_reactLooselyLazy.LazySuspense, {
55
- fallback: /*#__PURE__*/_react.default.createElement(_loaderFallback.LoaderFallback, {
56
- hideDisplayText: props.hideDisplayText
57
- })
58
- }, /*#__PURE__*/_react.default.createElement(RootComponent, (0, _extends2.default)({}, props, {
70
+ }, (0, _react2.jsx)(_sessionProvider.LinkPickerSessionProvider, null, (0, _react2.jsx)(_messagesProvider.MessagesProvider, null, (0, _react2.jsx)(RootFixedWidthContainer, null, (0, _react2.jsx)(_errorBoundary.ErrorBoundary, null, (0, _react2.jsx)(_reactLooselyLazy.LazySuspense, {
71
+ fallback: (0, _react2.jsx)(LoaderFallbackContainer, null, (0, _react2.jsx)(_loaderFallback.LoaderFallback, {
72
+ hideDisplayText: props.hideDisplayText,
73
+ isLoadingPlugins: props.isLoadingPlugins,
74
+ plugins: props.plugins
75
+ }))
76
+ }, (0, _react2.jsx)(RootComponent, (0, _extends2.default)({}, props, {
59
77
  "data-testid": testIds.linkPickerRoot
60
- }), /*#__PURE__*/_react.default.createElement(LazyLinkPicker, props)))))));
78
+ }), (0, _react2.jsx)(LazyLinkPicker, props))))))));
61
79
  });
62
80
  exports.ComposedLinkPicker = ComposedLinkPicker;
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.tabsWrapperStyles = exports.rootContainerStyles = exports.formFooterMargin = exports.flexColumnStyles = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
+ var _constants = require("../../common/constants");
10
12
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
11
- var LINK_PICKER_WIDTH_IN_PX = 342;
12
-
13
13
  /**
14
14
  * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
15
15
  */
16
- var rootContainerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n padding: ", " ", "\n ", ";\n box-sizing: border-box;\n line-height: initial;\n"])), LINK_PICKER_WIDTH_IN_PX, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
16
+ var rootContainerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", ";\n padding: ", " ", "\n ", ";\n box-sizing: border-box;\n line-height: initial;\n"])), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results') ? undefined : "".concat(_constants.LINK_PICKER_WIDTH_IN_PX, "px"), "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
17
17
  exports.rootContainerStyles = rootContainerStyles;
18
18
  var tabsWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n margin-left: calc(-1 * ", ");\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
19
19
  exports.tabsWrapperStyles = tabsWrapperStyles;
@@ -6,18 +6,36 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.LoaderFallback = void 0;
8
8
  var _react = require("@emotion/react");
9
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
10
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
10
- var _styled = require("./styled");
11
+ var _constants = require("../../common/constants");
12
+ var _minHeightContainer = require("../../common/ui/min-height-container");
11
13
  /** @jsx jsx */
12
14
 
15
+ // EDM-7122: can delete these two consts once min height container for link picker is firm for the loader
16
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = '142px';
17
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = '220px';
18
+ var getEstimatedMinHeight = function getEstimatedMinHeight(_ref) {
19
+ var hideDisplayText = _ref.hideDisplayText,
20
+ isLoadingPlugins = _ref.isLoadingPlugins,
21
+ plugins = _ref.plugins;
22
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.fixed-height-search-results')) {
23
+ if (plugins !== null && plugins !== void 0 && plugins.length || isLoadingPlugins) {
24
+ return hideDisplayText ? _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT : _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
25
+ }
26
+ return hideDisplayText ? _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT : _constants.LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
27
+ }
28
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT;
29
+ };
30
+
13
31
  /**
14
- * Loader / skeleton for the Link Picker. Takes displayText prop - when no displayText is given the height of the skeleton
15
- * is shorter to prevent jump when loading in Link Picker.
32
+ * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
33
+ * to determine the height to prevent jumps in height when loading
16
34
  */
17
- var LoaderFallback = function LoaderFallback(_ref) {
18
- var hideDisplayText = _ref.hideDisplayText;
19
- return (0, _react.jsx)("div", {
20
- css: hideDisplayText ? _styled.rootContainerStylesForLoaderWithoutDisplaytext : _styled.rootContainerStylesForLoaderWithDisplaytext,
35
+ var LoaderFallback = function LoaderFallback(props) {
36
+ var minHeight = getEstimatedMinHeight(props);
37
+ return (0, _react.jsx)(_minHeightContainer.MinHeightContainer, {
38
+ minHeight: minHeight,
21
39
  "data-testid": "link-picker-root-loader-boundary-ui"
22
40
  }, (0, _react.jsx)(_spinner.default, {
23
41
  testId: "link-picker.component-loading-indicator",
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.fixedWidthContainerStyles = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _constants = require("../common/constants");
11
+ var _templateObject;
12
+ var fixedWidthContainerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n"])), _constants.LINK_PICKER_WIDTH_IN_PX);
13
+ exports.fixedWidthContainerStyles = fixedWidthContainerStyles;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.25.6",
3
+ "version": "1.26.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,9 @@
1
1
  export const ANALYTICS_CHANNEL = 'media';
2
2
  export const COMPONENT_NAME = 'linkPicker';
3
3
  export const RECENT_SEARCH_LIST_SIZE = 5;
4
- export const LINK_PICKER_WIDTH_IN_PX = 342;
4
+ export const LINK_PICKER_WIDTH_IN_PX = 342;
5
+ export const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
6
+ export const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
7
+ export const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
8
+ export const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
9
+ export const LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = '290px';
@@ -0,0 +1,18 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+ import React, { forwardRef } from 'react';
4
+ import { jsx } from '@emotion/react';
5
+ import { minHeightComponentStyles } from './styled';
6
+ export const MinHeightContainer = /*#__PURE__*/forwardRef(({
7
+ minHeight,
8
+ ...props
9
+ }, ref) => {
10
+ return jsx("div", _extends({
11
+ ref: ref,
12
+ css: minHeightComponentStyles
13
+ }, props, {
14
+ style: {
15
+ ['--link-picker-min-height']: minHeight
16
+ }
17
+ }));
18
+ });
@@ -0,0 +1,7 @@
1
+ import { css } from '@emotion/react';
2
+ export const minHeightComponentStyles = css`
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ min-height: var(--link-picker-min-height);
7
+ `;
@@ -2,9 +2,13 @@
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 { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
5
7
  import { GenericErrorSVG } from '../../../common/generic-error-svg';
8
+ import { MinHeightContainer } from '../../../common/ui/min-height-container';
6
9
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
7
10
  import { rootContainerStyles } from '../../link-picker/styled';
11
+ import { errorBoundaryFallbackStyles } from './styled';
8
12
  const messages = defineMessages({
9
13
  heading: {
10
14
  defaultMessage: 'Something went wrong!',
@@ -21,6 +25,17 @@ export const ErrorBoundaryFallback = () => {
21
25
  const intl = useIntl();
22
26
  const header = intl.formatMessage(messages.heading);
23
27
  const description = intl.formatMessage(messages.description);
28
+ if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
29
+ return jsx(MinHeightContainer, {
30
+ css: errorBoundaryFallbackStyles,
31
+ minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
32
+ "data-testid": "link-picker-root-error-boundary-ui"
33
+ }, jsx(EmptyState, {
34
+ header: header,
35
+ renderImage: () => jsx(GenericErrorSVG, null),
36
+ description: description
37
+ }));
38
+ }
24
39
  return jsx("div", {
25
40
  css: rootContainerStyles,
26
41
  "data-testid": "link-picker-root-error-boundary-ui"
@@ -0,0 +1,4 @@
1
+ import { css } from '@emotion/react';
2
+ export const errorBoundaryFallbackStyles = css`
3
+ line-height: initial;
4
+ `;
@@ -1,13 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { memo } from 'react';
2
+ /** @jsx jsx */
3
+ import React, { Fragment, memo } from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import { lazyForPaint, LazySuspense } from 'react-loosely-lazy';
4
6
  import { AnalyticsContext } from '@atlaskit/analytics-next';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
8
  import { COMPONENT_NAME } from '../common/constants';
6
9
  import { LinkPickerSessionProvider } from '../controllers/session-provider';
7
10
  import { name as packageName, version as packageVersion } from '../version.json';
8
11
  import { ErrorBoundary } from './error-boundary';
9
12
  import { LoaderFallback } from './loader-fallback';
10
13
  import { MessagesProvider } from './messages-provider';
14
+ import { fixedWidthContainerStyles } from './styled';
11
15
  export const testIds = {
12
16
  linkPickerRoot: 'link-picker-root'
13
17
  };
@@ -26,22 +30,37 @@ const LazyLinkPicker = lazyForPaint(() => import( /* webpackChunkName: "@atlaski
26
30
  const DefaultRootComponent = ({
27
31
  children
28
32
  }) => {
29
- return /*#__PURE__*/React.createElement("div", {
33
+ return jsx("div", {
30
34
  "data-testid": testIds.linkPickerRoot
31
35
  }, children);
32
36
  };
37
+ const FixedWidthContainer = props => {
38
+ return jsx("div", _extends({
39
+ css: fixedWidthContainerStyles
40
+ }, props));
41
+ };
33
42
  export const ComposedLinkPicker = /*#__PURE__*/memo(props => {
34
43
  const {
35
44
  component
36
45
  } = props;
37
46
  const RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
38
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
47
+
48
+ /**
49
+ * When ff enabled: root container will provide width to component + loader + error boundary
50
+ * When ff disabled: component + loader + error boundary each providing their own width
51
+ * Cannot make this change easier at risk of regression as external adopters may have css override on the form element
52
+ */
53
+ const RootFixedWidthContainer = getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : Fragment;
54
+ const LoaderFallbackContainer = getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? Fragment : FixedWidthContainer;
55
+ return jsx(AnalyticsContext, {
39
56
  data: PACKAGE_DATA
40
- }, /*#__PURE__*/React.createElement(LinkPickerSessionProvider, null, /*#__PURE__*/React.createElement(MessagesProvider, null, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LazySuspense, {
41
- fallback: /*#__PURE__*/React.createElement(LoaderFallback, {
42
- hideDisplayText: props.hideDisplayText
43
- })
44
- }, /*#__PURE__*/React.createElement(RootComponent, _extends({}, props, {
57
+ }, jsx(LinkPickerSessionProvider, null, jsx(MessagesProvider, null, jsx(RootFixedWidthContainer, null, jsx(ErrorBoundary, null, jsx(LazySuspense, {
58
+ fallback: jsx(LoaderFallbackContainer, null, jsx(LoaderFallback, {
59
+ hideDisplayText: props.hideDisplayText,
60
+ isLoadingPlugins: props.isLoadingPlugins,
61
+ plugins: props.plugins
62
+ }))
63
+ }, jsx(RootComponent, _extends({}, props, {
45
64
  "data-testid": testIds.linkPickerRoot
46
- }), /*#__PURE__*/React.createElement(LazyLinkPicker, props)))))));
65
+ }), jsx(LazyLinkPicker, props))))))));
47
66
  });
@@ -1,11 +1,12 @@
1
1
  import { css } from '@emotion/react';
2
- const LINK_PICKER_WIDTH_IN_PX = 342;
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { LINK_PICKER_WIDTH_IN_PX } from '../../common/constants';
3
4
 
4
5
  /**
5
6
  * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
6
7
  */
7
8
  export const rootContainerStyles = css`
8
- width: ${LINK_PICKER_WIDTH_IN_PX}px;
9
+ width: ${getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? undefined : `${LINK_PICKER_WIDTH_IN_PX}px`};
9
10
  padding: ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-200, 16px)"}
10
11
  ${"var(--ds-space-200, 16px)"};
11
12
  box-sizing: border-box;
@@ -1,18 +1,37 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
4
  import Spinner from '@atlaskit/spinner';
4
- import { rootContainerStylesForLoaderWithDisplaytext, rootContainerStylesForLoaderWithoutDisplaytext } from './styled';
5
+ import { LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT } from '../../common/constants';
6
+ import { MinHeightContainer } from '../../common/ui/min-height-container';
7
+ // EDM-7122: can delete these two consts once min height container for link picker is firm for the loader
8
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = '142px';
9
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = '220px';
10
+ const getEstimatedMinHeight = ({
11
+ hideDisplayText,
12
+ isLoadingPlugins,
13
+ plugins
14
+ }) => {
15
+ if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
16
+ if (plugins !== null && plugins !== void 0 && plugins.length || isLoadingPlugins) {
17
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
18
+ }
19
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
20
+ }
21
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT;
22
+ };
5
23
 
6
24
  /**
7
- * Loader / skeleton for the Link Picker. Takes displayText prop - when no displayText is given the height of the skeleton
8
- * is shorter to prevent jump when loading in Link Picker.
25
+ * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
26
+ * to determine the height to prevent jumps in height when loading
9
27
  */
10
- export const LoaderFallback = ({
11
- hideDisplayText
12
- }) => jsx("div", {
13
- css: hideDisplayText ? rootContainerStylesForLoaderWithoutDisplaytext : rootContainerStylesForLoaderWithDisplaytext,
14
- "data-testid": "link-picker-root-loader-boundary-ui"
15
- }, jsx(Spinner, {
16
- testId: "link-picker.component-loading-indicator",
17
- size: "medium"
18
- }));
28
+ export const LoaderFallback = props => {
29
+ const minHeight = getEstimatedMinHeight(props);
30
+ return jsx(MinHeightContainer, {
31
+ minHeight: minHeight,
32
+ "data-testid": "link-picker-root-loader-boundary-ui"
33
+ }, jsx(Spinner, {
34
+ testId: "link-picker.component-loading-indicator",
35
+ size: "medium"
36
+ }));
37
+ };
@@ -0,0 +1,5 @@
1
+ import { css } from '@emotion/react';
2
+ import { LINK_PICKER_WIDTH_IN_PX } from '../common/constants';
3
+ export const fixedWidthContainerStyles = css`
4
+ width: ${LINK_PICKER_WIDTH_IN_PX}px;
5
+ `;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.25.6",
3
+ "version": "1.26.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,9 @@
1
1
  export var ANALYTICS_CHANNEL = 'media';
2
2
  export var COMPONENT_NAME = 'linkPicker';
3
3
  export var RECENT_SEARCH_LIST_SIZE = 5;
4
- export var LINK_PICKER_WIDTH_IN_PX = 342;
4
+ export var LINK_PICKER_WIDTH_IN_PX = 342;
5
+ export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
6
+ export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
7
+ export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
8
+ export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
9
+ export var LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = '290px';
@@ -0,0 +1,18 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ var _excluded = ["minHeight"];
5
+ /** @jsx jsx */
6
+ import React, { forwardRef } from 'react';
7
+ import { jsx } from '@emotion/react';
8
+ import { minHeightComponentStyles } from './styled';
9
+ export var MinHeightContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
10
+ var minHeight = _ref.minHeight,
11
+ props = _objectWithoutProperties(_ref, _excluded);
12
+ return jsx("div", _extends({
13
+ ref: ref,
14
+ css: minHeightComponentStyles
15
+ }, props, {
16
+ style: _defineProperty({}, '--link-picker-min-height', minHeight)
17
+ }));
18
+ });
@@ -0,0 +1,4 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import { css } from '@emotion/react';
4
+ export var minHeightComponentStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--link-picker-min-height);\n"])));
@@ -2,9 +2,13 @@
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 { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
5
7
  import { GenericErrorSVG } from '../../../common/generic-error-svg';
8
+ import { MinHeightContainer } from '../../../common/ui/min-height-container';
6
9
  // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
7
10
  import { rootContainerStyles } from '../../link-picker/styled';
11
+ import { errorBoundaryFallbackStyles } from './styled';
8
12
  var messages = defineMessages({
9
13
  heading: {
10
14
  defaultMessage: 'Something went wrong!',
@@ -21,6 +25,19 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
21
25
  var intl = useIntl();
22
26
  var header = intl.formatMessage(messages.heading);
23
27
  var description = intl.formatMessage(messages.description);
28
+ if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
29
+ return jsx(MinHeightContainer, {
30
+ css: errorBoundaryFallbackStyles,
31
+ minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
32
+ "data-testid": "link-picker-root-error-boundary-ui"
33
+ }, jsx(EmptyState, {
34
+ header: header,
35
+ renderImage: function renderImage() {
36
+ return jsx(GenericErrorSVG, null);
37
+ },
38
+ description: description
39
+ }));
40
+ }
24
41
  return jsx("div", {
25
42
  css: rootContainerStyles,
26
43
  "data-testid": "link-picker-root-error-boundary-ui"
@@ -0,0 +1,4 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import { css } from '@emotion/react';
4
+ export var errorBoundaryFallbackStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: initial;\n"])));
@@ -1,13 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { memo } from 'react';
2
+ /** @jsx jsx */
3
+ import React, { Fragment, memo } from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import { lazyForPaint, LazySuspense } from 'react-loosely-lazy';
4
6
  import { AnalyticsContext } from '@atlaskit/analytics-next';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
8
  import { COMPONENT_NAME } from '../common/constants';
6
9
  import { LinkPickerSessionProvider } from '../controllers/session-provider';
7
10
  import { name as packageName, version as packageVersion } from '../version.json';
8
11
  import { ErrorBoundary } from './error-boundary';
9
12
  import { LoaderFallback } from './loader-fallback';
10
13
  import { MessagesProvider } from './messages-provider';
14
+ import { fixedWidthContainerStyles } from './styled';
11
15
  export var testIds = {
12
16
  linkPickerRoot: 'link-picker-root'
13
17
  };
@@ -28,20 +32,35 @@ var LazyLinkPicker = lazyForPaint(function () {
28
32
  });
29
33
  var DefaultRootComponent = function DefaultRootComponent(_ref2) {
30
34
  var children = _ref2.children;
31
- return /*#__PURE__*/React.createElement("div", {
35
+ return jsx("div", {
32
36
  "data-testid": testIds.linkPickerRoot
33
37
  }, children);
34
38
  };
39
+ var FixedWidthContainer = function FixedWidthContainer(props) {
40
+ return jsx("div", _extends({
41
+ css: fixedWidthContainerStyles
42
+ }, props));
43
+ };
35
44
  export var ComposedLinkPicker = /*#__PURE__*/memo(function (props) {
36
45
  var component = props.component;
37
46
  var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
38
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
47
+
48
+ /**
49
+ * When ff enabled: root container will provide width to component + loader + error boundary
50
+ * When ff disabled: component + loader + error boundary each providing their own width
51
+ * Cannot make this change easier at risk of regression as external adopters may have css override on the form element
52
+ */
53
+ var RootFixedWidthContainer = getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : Fragment;
54
+ var LoaderFallbackContainer = getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? Fragment : FixedWidthContainer;
55
+ return jsx(AnalyticsContext, {
39
56
  data: PACKAGE_DATA
40
- }, /*#__PURE__*/React.createElement(LinkPickerSessionProvider, null, /*#__PURE__*/React.createElement(MessagesProvider, null, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LazySuspense, {
41
- fallback: /*#__PURE__*/React.createElement(LoaderFallback, {
42
- hideDisplayText: props.hideDisplayText
43
- })
44
- }, /*#__PURE__*/React.createElement(RootComponent, _extends({}, props, {
57
+ }, jsx(LinkPickerSessionProvider, null, jsx(MessagesProvider, null, jsx(RootFixedWidthContainer, null, jsx(ErrorBoundary, null, jsx(LazySuspense, {
58
+ fallback: jsx(LoaderFallbackContainer, null, jsx(LoaderFallback, {
59
+ hideDisplayText: props.hideDisplayText,
60
+ isLoadingPlugins: props.isLoadingPlugins,
61
+ plugins: props.plugins
62
+ }))
63
+ }, jsx(RootComponent, _extends({}, props, {
45
64
  "data-testid": testIds.linkPickerRoot
46
- }), /*#__PURE__*/React.createElement(LazyLinkPicker, props)))))));
65
+ }), jsx(LazyLinkPicker, props))))))));
47
66
  });
@@ -1,12 +1,13 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
3
  import { css } from '@emotion/react';
4
- var LINK_PICKER_WIDTH_IN_PX = 342;
4
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
+ import { LINK_PICKER_WIDTH_IN_PX } from '../../common/constants';
5
6
 
6
7
  /**
7
8
  * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
8
9
  */
9
- export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n padding: ", " ", "\n ", ";\n box-sizing: border-box;\n line-height: initial;\n"])), LINK_PICKER_WIDTH_IN_PX, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
10
+ export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", ";\n padding: ", " ", "\n ", ";\n box-sizing: border-box;\n line-height: initial;\n"])), getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? undefined : "".concat(LINK_PICKER_WIDTH_IN_PX, "px"), "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
10
11
  export var tabsWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: ", ";\n margin-left: calc(-1 * ", ");\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
11
12
  export var flexColumnStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
12
13
  export var formFooterMargin = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-200, 16px)");
@@ -1,16 +1,33 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
4
  import Spinner from '@atlaskit/spinner';
4
- import { rootContainerStylesForLoaderWithDisplaytext, rootContainerStylesForLoaderWithoutDisplaytext } from './styled';
5
+ import { LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT } from '../../common/constants';
6
+ import { MinHeightContainer } from '../../common/ui/min-height-container';
7
+ // EDM-7122: can delete these two consts once min height container for link picker is firm for the loader
8
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = '142px';
9
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = '220px';
10
+ var getEstimatedMinHeight = function getEstimatedMinHeight(_ref) {
11
+ var hideDisplayText = _ref.hideDisplayText,
12
+ isLoadingPlugins = _ref.isLoadingPlugins,
13
+ plugins = _ref.plugins;
14
+ if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
15
+ if (plugins !== null && plugins !== void 0 && plugins.length || isLoadingPlugins) {
16
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
17
+ }
18
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
19
+ }
20
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT;
21
+ };
5
22
 
6
23
  /**
7
- * Loader / skeleton for the Link Picker. Takes displayText prop - when no displayText is given the height of the skeleton
8
- * is shorter to prevent jump when loading in Link Picker.
24
+ * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
25
+ * to determine the height to prevent jumps in height when loading
9
26
  */
10
- export var LoaderFallback = function LoaderFallback(_ref) {
11
- var hideDisplayText = _ref.hideDisplayText;
12
- return jsx("div", {
13
- css: hideDisplayText ? rootContainerStylesForLoaderWithoutDisplaytext : rootContainerStylesForLoaderWithDisplaytext,
27
+ export var LoaderFallback = function LoaderFallback(props) {
28
+ var minHeight = getEstimatedMinHeight(props);
29
+ return jsx(MinHeightContainer, {
30
+ minHeight: minHeight,
14
31
  "data-testid": "link-picker-root-loader-boundary-ui"
15
32
  }, jsx(Spinner, {
16
33
  testId: "link-picker.component-loading-indicator",
@@ -0,0 +1,5 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import { css } from '@emotion/react';
4
+ import { LINK_PICKER_WIDTH_IN_PX } from '../common/constants';
5
+ export var fixedWidthContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n"])), LINK_PICKER_WIDTH_IN_PX);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.25.6",
3
+ "version": "1.26.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,3 +2,8 @@ export declare const ANALYTICS_CHANNEL = "media";
2
2
  export declare const COMPONENT_NAME = "linkPicker";
3
3
  export declare const RECENT_SEARCH_LIST_SIZE = 5;
4
4
  export declare const LINK_PICKER_WIDTH_IN_PX = 342;
5
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = "472px";
6
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = "550px";
7
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = "218px";
8
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = "141px";
9
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = "290px";
@@ -0,0 +1,5 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ export declare const MinHeightContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
4
+ minHeight: string;
5
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export declare const minHeightComponentStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const errorBoundaryFallbackStyles: import("@emotion/react").SerializedStyles;
@@ -1,8 +1,10 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
3
5
  import { LinkPickerProps } from './link-picker';
4
6
  export declare const testIds: {
5
7
  linkPickerRoot: string;
6
8
  };
7
9
  export declare const PACKAGE_DATA: PackageMetaDataType;
8
- export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
10
+ export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => jsx.JSX.Element>;
@@ -1,9 +1,12 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
+ export type LoaderFallbackProps = {
4
+ hideDisplayText?: boolean;
5
+ isLoadingPlugins?: boolean;
6
+ plugins?: unknown[];
7
+ };
3
8
  /**
4
- * Loader / skeleton for the Link Picker. Takes displayText prop - when no displayText is given the height of the skeleton
5
- * is shorter to prevent jump when loading in Link Picker.
9
+ * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
10
+ * to determine the height to prevent jumps in height when loading
6
11
  */
7
- export declare const LoaderFallback: ({ hideDisplayText, }: {
8
- hideDisplayText?: boolean | undefined;
9
- }) => jsx.JSX.Element;
12
+ export declare const LoaderFallback: (props: LoaderFallbackProps) => jsx.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const fixedWidthContainerStyles: import("@emotion/react").SerializedStyles;
@@ -2,3 +2,8 @@ export declare const ANALYTICS_CHANNEL = "media";
2
2
  export declare const COMPONENT_NAME = "linkPicker";
3
3
  export declare const RECENT_SEARCH_LIST_SIZE = 5;
4
4
  export declare const LINK_PICKER_WIDTH_IN_PX = 342;
5
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = "472px";
6
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = "550px";
7
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = "218px";
8
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = "141px";
9
+ export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = "290px";
@@ -0,0 +1,5 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ export declare const MinHeightContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
4
+ minHeight: string;
5
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export declare const minHeightComponentStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const errorBoundaryFallbackStyles: import("@emotion/react").SerializedStyles;
@@ -1,8 +1,10 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { PackageMetaDataType } from '../common/utils/analytics/analytics.codegen';
3
5
  import { LinkPickerProps } from './link-picker';
4
6
  export declare const testIds: {
5
7
  linkPickerRoot: string;
6
8
  };
7
9
  export declare const PACKAGE_DATA: PackageMetaDataType;
8
- export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
10
+ export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => jsx.JSX.Element>;
@@ -1,9 +1,12 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
+ export type LoaderFallbackProps = {
4
+ hideDisplayText?: boolean;
5
+ isLoadingPlugins?: boolean;
6
+ plugins?: unknown[];
7
+ };
3
8
  /**
4
- * Loader / skeleton for the Link Picker. Takes displayText prop - when no displayText is given the height of the skeleton
5
- * is shorter to prevent jump when loading in Link Picker.
9
+ * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
10
+ * to determine the height to prevent jumps in height when loading
6
11
  */
7
- export declare const LoaderFallback: ({ hideDisplayText, }: {
8
- hideDisplayText?: boolean | undefined;
9
- }) => jsx.JSX.Element;
12
+ export declare const LoaderFallback: (props: LoaderFallbackProps) => jsx.JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const fixedWidthContainerStyles: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.25.6",
3
+ "version": "1.26.0",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -39,6 +39,9 @@
39
39
  },
40
40
  "platform.linking-platform.link-picker.lazy-intl-messages": {
41
41
  "type": "boolean"
42
+ },
43
+ "platform.linking-platform.link-picker.fixed-height-search-results": {
44
+ "type": "boolean"
42
45
  }
43
46
  },
44
47
  "scripts": {
@@ -57,7 +60,7 @@
57
60
  "@atlaskit/platform-feature-flags": "^0.2.1",
58
61
  "@atlaskit/spinner": "^15.5.0",
59
62
  "@atlaskit/tabs": "^13.4.0",
60
- "@atlaskit/textfield": "^5.5.0",
63
+ "@atlaskit/textfield": "^5.6.0",
61
64
  "@atlaskit/theme": "^12.5.0",
62
65
  "@atlaskit/tokens": "^1.11.0",
63
66
  "@atlaskit/tooltip": "^17.8.0",
@@ -78,21 +81,14 @@
78
81
  "devDependencies": {
79
82
  "@af/analytics-codegen": "^0.1.0",
80
83
  "@af/visual-regression": "*",
81
- "@atlaskit/docs": "*",
82
84
  "@atlaskit/dropdown-menu": "^11.10.0",
83
- "@atlaskit/link-analytics": "^8.2.0",
84
85
  "@atlaskit/link-provider": "^1.6.0",
85
86
  "@atlaskit/link-test-helpers": "^4.1.0",
86
87
  "@atlaskit/linking-common": "^3.2.0",
87
- "@atlaskit/popup": "^1.8.0",
88
- "@atlaskit/toggle": "^12.6.0",
89
88
  "@atlaskit/visual-regression": "*",
90
89
  "@atlaskit/webdriver-runner": "*",
91
90
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
92
91
  "@atlassian/feature-flags-test-utils": "*",
93
- "@atlassian/link-picker-atlassian-plugin": "^34.1.0",
94
- "@atlassian/link-picker-plugins": "^23.0.0",
95
- "@atlassian/recent-work-client": "^1.8.0",
96
92
  "@testing-library/dom": "^8.17.1",
97
93
  "@testing-library/jest-dom": "^5.16.5",
98
94
  "@testing-library/react": "^12.1.5",
@@ -128,6 +124,9 @@
128
124
  "design-tokens": [
129
125
  "color",
130
126
  "spacing"
127
+ ],
128
+ "imports": [
129
+ "import-no-extraneous-disable-for-examples-and-docs"
131
130
  ]
132
131
  }
133
132
  },
package/report.api.md CHANGED
@@ -17,6 +17,7 @@
17
17
  ```ts
18
18
  /// <reference types="react" />
19
19
 
20
+ import { jsx } from '@emotion/react';
20
21
  import { MessageDescriptor } from 'react-intl-next';
21
22
  import { default as React_2 } from 'react';
22
23
  import { ReactNode } from 'react';
@@ -27,7 +28,7 @@ export type LinkInputType = 'manual' | 'typeAhead';
27
28
 
28
29
  // @public (undocumented)
29
30
  export const LinkPicker: React_2.MemoExoticComponent<
30
- (props: LinkPickerProps) => JSX.Element
31
+ (props: LinkPickerProps) => jsx.JSX.Element
31
32
  >;
32
33
 
33
34
  // @public (undocumented)
@@ -6,6 +6,7 @@
6
6
 
7
7
  /// <reference types="react" />
8
8
 
9
+ import { jsx } from '@emotion/react';
9
10
  import { MessageDescriptor } from 'react-intl-next';
10
11
  import { default as React_2 } from 'react';
11
12
  import { ReactNode } from 'react';
@@ -15,7 +16,7 @@ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
15
16
  export type LinkInputType = 'manual' | 'typeAhead';
16
17
 
17
18
  // @public (undocumented)
18
- export const LinkPicker: React_2.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
19
+ export const LinkPicker: React_2.MemoExoticComponent<(props: LinkPickerProps) => jsx.JSX.Element>;
19
20
 
20
21
  // @public (undocumented)
21
22
  export interface LinkPickerPlugin {
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.rootContainerStylesForLoaderWithoutDisplaytext = exports.rootContainerStylesForLoaderWithDisplaytext = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _styled = require("../link-picker/styled");
11
- var _templateObject, _templateObject2, _templateObject3; // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
12
- /** Link Picker loader / skeleton will be taller in height when displayText field is shown */ // See lazy-load-height example to verify these
13
- var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = 142;
14
- var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = 220;
15
- var rootContainerStylesForLoader = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n display: flex;\n align-items: center;\n justify-content: center;\n"])), _styled.rootContainerStyles);
16
- var rootContainerStylesForLoaderWithDisplaytext = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n min-height: ", "px;\n"])), rootContainerStylesForLoader, LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT);
17
-
18
- /** Link Picker loader / skeleton will be shorter in height when displayText field isn't shown */
19
- exports.rootContainerStylesForLoaderWithDisplaytext = rootContainerStylesForLoaderWithDisplaytext;
20
- var rootContainerStylesForLoaderWithoutDisplaytext = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n min-height: ", "px;\n"])), rootContainerStylesForLoader, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT);
21
- exports.rootContainerStylesForLoaderWithoutDisplaytext = rootContainerStylesForLoaderWithoutDisplaytext;
@@ -1,25 +0,0 @@
1
- import { css } from '@emotion/react';
2
-
3
- // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
4
- import { rootContainerStyles } from '../link-picker/styled';
5
-
6
- /** Link Picker loader / skeleton will be taller in height when displayText field is shown */
7
- // See lazy-load-height example to verify these
8
- const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = 142;
9
- const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = 220;
10
- const rootContainerStylesForLoader = css`
11
- ${rootContainerStyles}
12
- display: flex;
13
- align-items: center;
14
- justify-content: center;
15
- `;
16
- export const rootContainerStylesForLoaderWithDisplaytext = css`
17
- ${rootContainerStylesForLoader}
18
- min-height: ${LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT}px;
19
- `;
20
-
21
- /** Link Picker loader / skeleton will be shorter in height when displayText field isn't shown */
22
- export const rootContainerStylesForLoaderWithoutDisplaytext = css`
23
- ${rootContainerStylesForLoader}
24
- min-height: ${LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT}px;
25
- `;
@@ -1,16 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3;
3
- import { css } from '@emotion/react';
4
-
5
- // eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports
6
- import { rootContainerStyles } from '../link-picker/styled';
7
-
8
- /** Link Picker loader / skeleton will be taller in height when displayText field is shown */
9
- // See lazy-load-height example to verify these
10
- var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = 142;
11
- var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = 220;
12
- var rootContainerStylesForLoader = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n display: flex;\n align-items: center;\n justify-content: center;\n"])), rootContainerStyles);
13
- export var rootContainerStylesForLoaderWithDisplaytext = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n min-height: ", "px;\n"])), rootContainerStylesForLoader, LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT);
14
-
15
- /** Link Picker loader / skeleton will be shorter in height when displayText field isn't shown */
16
- export var rootContainerStylesForLoaderWithoutDisplaytext = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n min-height: ", "px;\n"])), rootContainerStylesForLoader, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT);
@@ -1,3 +0,0 @@
1
- export declare const rootContainerStylesForLoaderWithDisplaytext: import("@emotion/react").SerializedStyles;
2
- /** Link Picker loader / skeleton will be shorter in height when displayText field isn't shown */
3
- export declare const rootContainerStylesForLoaderWithoutDisplaytext: import("@emotion/react").SerializedStyles;
@@ -1,3 +0,0 @@
1
- export declare const rootContainerStylesForLoaderWithDisplaytext: import("@emotion/react").SerializedStyles;
2
- /** Link Picker loader / skeleton will be shorter in height when displayText field isn't shown */
3
- export declare const rootContainerStylesForLoaderWithoutDisplaytext: import("@emotion/react").SerializedStyles;