@atlaskit/editor-common 74.57.0 → 74.58.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 (108) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/element-browser/ElementBrowser.js +152 -0
  3. package/dist/cjs/element-browser/ViewMore.js +39 -0
  4. package/dist/cjs/element-browser/components/CategoryList.js +115 -0
  5. package/dist/cjs/element-browser/components/ElementBrowserLoader.js +36 -0
  6. package/dist/cjs/element-browser/components/ElementList/ElementList.js +256 -0
  7. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +47 -0
  8. package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +70 -0
  9. package/dist/cjs/element-browser/components/ElementList/cellSizeAndPositionGetter.js +42 -0
  10. package/dist/cjs/element-browser/components/ElementList/utils.js +54 -0
  11. package/dist/cjs/element-browser/components/ElementSearch.js +88 -0
  12. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +269 -0
  13. package/dist/cjs/element-browser/constants.js +41 -0
  14. package/dist/cjs/element-browser/hooks/use-container-width.js +70 -0
  15. package/dist/cjs/element-browser/hooks/use-focus.js +51 -0
  16. package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +286 -0
  17. package/dist/cjs/element-browser/index.js +20 -0
  18. package/dist/cjs/element-browser/types.js +12 -0
  19. package/dist/cjs/monitoring/error.js +1 -1
  20. package/dist/cjs/ui/DropList/index.js +1 -1
  21. package/dist/cjs/utils/performance/measure-render.js +4 -3
  22. package/dist/cjs/utils/performance/measure-tti.js +9 -3
  23. package/dist/es2019/element-browser/ElementBrowser.js +117 -0
  24. package/dist/es2019/element-browser/ViewMore.js +40 -0
  25. package/dist/es2019/element-browser/components/CategoryList.js +106 -0
  26. package/dist/es2019/element-browser/components/ElementBrowserLoader.js +21 -0
  27. package/dist/es2019/element-browser/components/ElementList/ElementList.js +320 -0
  28. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +58 -0
  29. package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +65 -0
  30. package/dist/es2019/element-browser/components/ElementList/cellSizeAndPositionGetter.js +39 -0
  31. package/dist/es2019/element-browser/components/ElementList/utils.js +50 -0
  32. package/dist/es2019/element-browser/components/ElementSearch.js +117 -0
  33. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +339 -0
  34. package/dist/es2019/element-browser/constants.js +23 -0
  35. package/dist/es2019/element-browser/hooks/use-container-width.js +59 -0
  36. package/dist/es2019/element-browser/hooks/use-focus.js +48 -0
  37. package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +284 -0
  38. package/dist/es2019/element-browser/index.js +2 -0
  39. package/dist/es2019/element-browser/types.js +5 -0
  40. package/dist/es2019/monitoring/error.js +1 -1
  41. package/dist/es2019/ui/DropList/index.js +1 -1
  42. package/dist/es2019/utils/performance/measure-render.js +2 -3
  43. package/dist/es2019/utils/performance/measure-tti.js +9 -3
  44. package/dist/esm/element-browser/ElementBrowser.js +142 -0
  45. package/dist/esm/element-browser/ViewMore.js +31 -0
  46. package/dist/esm/element-browser/components/CategoryList.js +105 -0
  47. package/dist/esm/element-browser/components/ElementBrowserLoader.js +23 -0
  48. package/dist/esm/element-browser/components/ElementList/ElementList.js +241 -0
  49. package/dist/esm/element-browser/components/ElementList/EmptyState.js +40 -0
  50. package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +63 -0
  51. package/dist/esm/element-browser/components/ElementList/cellSizeAndPositionGetter.js +37 -0
  52. package/dist/esm/element-browser/components/ElementList/utils.js +46 -0
  53. package/dist/esm/element-browser/components/ElementSearch.js +77 -0
  54. package/dist/esm/element-browser/components/StatelessElementBrowser.js +258 -0
  55. package/dist/esm/element-browser/constants.js +23 -0
  56. package/dist/esm/element-browser/hooks/use-container-width.js +61 -0
  57. package/dist/esm/element-browser/hooks/use-focus.js +46 -0
  58. package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +278 -0
  59. package/dist/esm/element-browser/index.js +2 -0
  60. package/dist/esm/element-browser/types.js +5 -0
  61. package/dist/esm/monitoring/error.js +1 -1
  62. package/dist/esm/ui/DropList/index.js +1 -1
  63. package/dist/esm/utils/performance/measure-render.js +2 -3
  64. package/dist/esm/utils/performance/measure-tti.js +9 -3
  65. package/dist/types/analytics/types/general-events.d.ts +2 -1
  66. package/dist/types/element-browser/ElementBrowser.d.ts +37 -0
  67. package/dist/types/element-browser/ViewMore.d.ts +6 -0
  68. package/dist/types/element-browser/components/CategoryList.d.ts +10 -0
  69. package/dist/types/element-browser/components/ElementBrowserLoader.d.ts +6 -0
  70. package/dist/types/element-browser/components/ElementList/ElementList.d.ts +33 -0
  71. package/dist/types/element-browser/components/ElementList/EmptyState.d.ts +6 -0
  72. package/dist/types/element-browser/components/ElementList/NotFoundIllustration.d.ts +2 -0
  73. package/dist/types/element-browser/components/ElementList/cellSizeAndPositionGetter.d.ts +7 -0
  74. package/dist/types/element-browser/components/ElementList/utils.d.ts +12 -0
  75. package/dist/types/element-browser/components/ElementSearch.d.ts +18 -0
  76. package/dist/types/element-browser/components/StatelessElementBrowser.d.ts +23 -0
  77. package/dist/types/element-browser/constants.d.ts +19 -0
  78. package/dist/types/element-browser/hooks/use-container-width.d.ts +33 -0
  79. package/dist/types/element-browser/hooks/use-focus.d.ts +35 -0
  80. package/dist/types/element-browser/hooks/use-select-and-focus-on-arrow-navigation.d.ts +72 -0
  81. package/dist/types/element-browser/index.d.ts +2 -0
  82. package/dist/types/element-browser/types.d.ts +12 -0
  83. package/dist/types/types/quick-insert.d.ts +1 -0
  84. package/dist/types/utils/performance/measure-render.d.ts +6 -4
  85. package/dist/types/utils/performance/measure-tti.d.ts +1 -1
  86. package/dist/types-ts4.5/analytics/types/general-events.d.ts +2 -1
  87. package/dist/types-ts4.5/element-browser/ElementBrowser.d.ts +37 -0
  88. package/dist/types-ts4.5/element-browser/ViewMore.d.ts +6 -0
  89. package/dist/types-ts4.5/element-browser/components/CategoryList.d.ts +10 -0
  90. package/dist/types-ts4.5/element-browser/components/ElementBrowserLoader.d.ts +6 -0
  91. package/dist/types-ts4.5/element-browser/components/ElementList/ElementList.d.ts +33 -0
  92. package/dist/types-ts4.5/element-browser/components/ElementList/EmptyState.d.ts +6 -0
  93. package/dist/types-ts4.5/element-browser/components/ElementList/NotFoundIllustration.d.ts +2 -0
  94. package/dist/types-ts4.5/element-browser/components/ElementList/cellSizeAndPositionGetter.d.ts +7 -0
  95. package/dist/types-ts4.5/element-browser/components/ElementList/utils.d.ts +12 -0
  96. package/dist/types-ts4.5/element-browser/components/ElementSearch.d.ts +18 -0
  97. package/dist/types-ts4.5/element-browser/components/StatelessElementBrowser.d.ts +23 -0
  98. package/dist/types-ts4.5/element-browser/constants.d.ts +19 -0
  99. package/dist/types-ts4.5/element-browser/hooks/use-container-width.d.ts +33 -0
  100. package/dist/types-ts4.5/element-browser/hooks/use-focus.d.ts +35 -0
  101. package/dist/types-ts4.5/element-browser/hooks/use-select-and-focus-on-arrow-navigation.d.ts +72 -0
  102. package/dist/types-ts4.5/element-browser/index.d.ts +2 -0
  103. package/dist/types-ts4.5/element-browser/types.d.ts +12 -0
  104. package/dist/types-ts4.5/types/quick-insert.d.ts +1 -0
  105. package/dist/types-ts4.5/utils/performance/measure-render.d.ts +6 -4
  106. package/dist/types-ts4.5/utils/performance/measure-tti.d.ts +1 -1
  107. package/element-browser/package.json +15 -0
  108. package/package.json +6 -2
@@ -0,0 +1,241 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
+ var _excluded = ["items", "mode", "selectedItemIndex", "focusedItemIndex", "setColumnCount", "createAnalyticsEvent", "emptyStateHandler", "selectedCategory", "searchTerm"];
6
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
7
+ /** @jsx jsx */
8
+ import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from 'react';
9
+ import { css, jsx } from '@emotion/react';
10
+ import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
11
+ import { Collection } from 'react-virtualized/dist/commonjs/Collection';
12
+ import { withAnalyticsContext } from '@atlaskit/analytics-next';
13
+ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
14
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
15
+ import { ButtonItem } from '@atlaskit/menu';
16
+ import { B100, N200 } from '@atlaskit/theme/colors';
17
+ import { borderRadius } from '@atlaskit/theme/constants';
18
+ import Tooltip from '@atlaskit/tooltip';
19
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
20
+ import { IconFallback } from '../../../quick-insert';
21
+ import { ELEMENT_LIST_PADDING, SCROLLBAR_WIDTH } from '../../constants';
22
+ import useContainerWidth from '../../hooks/use-container-width';
23
+ import useFocus from '../../hooks/use-focus';
24
+ import { Modes } from '../../types';
25
+ import cellSizeAndPositionGetter from './cellSizeAndPositionGetter';
26
+ import EmptyState from './EmptyState';
27
+ import { getColumnCount, getScrollbarWidth } from './utils';
28
+ export var ICON_HEIGHT = 40;
29
+ export var ICON_WIDTH = 40;
30
+ export var itemIcon = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, "var(--ds-border, rgba(223, 225, 229, 0.5))", borderRadius(), ICON_WIDTH, ICON_HEIGHT);
31
+ function ElementList(_ref) {
32
+ var items = _ref.items,
33
+ mode = _ref.mode,
34
+ selectedItemIndex = _ref.selectedItemIndex,
35
+ focusedItemIndex = _ref.focusedItemIndex,
36
+ setColumnCount = _ref.setColumnCount,
37
+ createAnalyticsEvent = _ref.createAnalyticsEvent,
38
+ emptyStateHandler = _ref.emptyStateHandler,
39
+ selectedCategory = _ref.selectedCategory,
40
+ searchTerm = _ref.searchTerm,
41
+ props = _objectWithoutProperties(_ref, _excluded);
42
+ var _useContainerWidth = useContainerWidth(),
43
+ containerWidth = _useContainerWidth.containerWidth,
44
+ ContainerWidthMonitor = _useContainerWidth.ContainerWidthMonitor;
45
+ var _useState = useState(SCROLLBAR_WIDTH),
46
+ _useState2 = _slicedToArray(_useState, 2),
47
+ scrollbarWidth = _useState2[0],
48
+ setScrollbarWidth = _useState2[1];
49
+ var fullMode = mode === Modes.full;
50
+ useEffect(function () {
51
+ /**
52
+ * More of an optimization condition.
53
+ * Initially the containerWidths are reported 0 twice.
54
+ **/
55
+ if (fullMode && containerWidth > 0) {
56
+ setColumnCount(getColumnCount(containerWidth));
57
+ var updatedScrollbarWidth = getScrollbarWidth();
58
+ if (updatedScrollbarWidth > 0) {
59
+ setScrollbarWidth(updatedScrollbarWidth);
60
+ }
61
+ }
62
+ }, [fullMode, containerWidth, setColumnCount, scrollbarWidth]);
63
+ var onExternalLinkClick = useCallback(function () {
64
+ fireAnalyticsEvent(createAnalyticsEvent)({
65
+ payload: {
66
+ action: ACTION.VISITED,
67
+ actionSubject: ACTION_SUBJECT.SMART_LINK,
68
+ eventType: EVENT_TYPE.TRACK
69
+ }
70
+ });
71
+ }, [createAnalyticsEvent]);
72
+ var cellRenderer = useMemo(function () {
73
+ return function (_ref2) {
74
+ var index = _ref2.index,
75
+ key = _ref2.key,
76
+ style = _ref2.style;
77
+ if (items[index] == null) {
78
+ return;
79
+ }
80
+ return jsx("div", {
81
+ style: style,
82
+ key: key,
83
+ className: "element-item-wrapper",
84
+ css: elementItemWrapper
85
+ }, jsx(MemoizedElementItem, _extends({
86
+ inlineMode: !fullMode,
87
+ index: index,
88
+ item: items[index],
89
+ selected: selectedItemIndex === index,
90
+ focus: focusedItemIndex === index
91
+ }, props)));
92
+ };
93
+ }, [items, fullMode, selectedItemIndex, focusedItemIndex, props]);
94
+ return jsx(Fragment, null, jsx(ContainerWidthMonitor, null), !items.length ? emptyStateHandler ? emptyStateHandler({
95
+ mode: mode,
96
+ selectedCategory: selectedCategory,
97
+ searchTerm: searchTerm
98
+ }) : jsx(EmptyState, {
99
+ onExternalLinkClick: onExternalLinkClick
100
+ }) : jsx("div", {
101
+ css: elementItemsWrapper,
102
+ "data-testid": "element-items"
103
+ }, jsx(Fragment, null, containerWidth > 0 && jsx(AutoSizer, {
104
+ disableWidth: true
105
+ }, function (_ref3) {
106
+ var height = _ref3.height;
107
+ return jsx(Collection, {
108
+ cellCount: items.length,
109
+ cellRenderer: cellRenderer,
110
+ cellSizeAndPositionGetter: cellSizeAndPositionGetter(containerWidth - ELEMENT_LIST_PADDING * 2, scrollbarWidth),
111
+ height: height,
112
+ width: containerWidth - ELEMENT_LIST_PADDING * 2 // containerWidth - padding on Left/Right (for focus outline)
113
+ /**
114
+ * Refresh Collection on WidthObserver value change.
115
+ * Length of the items used to force re-render to solve Firefox bug with react-virtualized retaining
116
+ * scroll position after updating the data. If new data has different number of cells, a re-render
117
+ * is forced to prevent the scroll position render bug.
118
+ */,
119
+ key: containerWidth + items.length,
120
+ scrollToCell: selectedItemIndex
121
+ });
122
+ }))));
123
+ }
124
+ var MemoizedElementItem = /*#__PURE__*/memo(ElementItem);
125
+ MemoizedElementItem.displayName = 'MemoizedElementItem';
126
+ export function ElementItem(_ref4) {
127
+ var inlineMode = _ref4.inlineMode,
128
+ selected = _ref4.selected,
129
+ item = _ref4.item,
130
+ index = _ref4.index,
131
+ onInsertItem = _ref4.onInsertItem,
132
+ focus = _ref4.focus,
133
+ setFocusedItemIndex = _ref4.setFocusedItemIndex;
134
+ var ref = useFocus(focus);
135
+
136
+ /**
137
+ * Note: props.onSelectItem(item) is not called here as the StatelessElementBrowser's
138
+ * useEffect would trigger it on selectedItemIndex change. (Line 106-110)
139
+ * This implementation was changed for keyboard/click selection to work with `onInsertItem`.
140
+ */
141
+ var onClick = useCallback(function (e) {
142
+ e.preventDefault();
143
+ e.stopPropagation();
144
+ setFocusedItemIndex(index);
145
+ switch (e.nativeEvent.detail) {
146
+ case 0:
147
+ onInsertItem(item);
148
+ break;
149
+ case 1:
150
+ if (inlineMode) {
151
+ onInsertItem(item);
152
+ }
153
+ break;
154
+ case 2:
155
+ if (!inlineMode) {
156
+ onInsertItem(item);
157
+ }
158
+ break;
159
+ default:
160
+ return;
161
+ }
162
+ }, [index, inlineMode, item, onInsertItem, setFocusedItemIndex]);
163
+ var icon = item.icon,
164
+ title = item.title,
165
+ description = item.description,
166
+ keyshortcut = item.keyshortcut;
167
+ return jsx(Tooltip, {
168
+ content: description,
169
+ testId: "element-item-tooltip-".concat(index)
170
+ }, jsx(ButtonItem, {
171
+ onClick: onClick,
172
+ iconBefore: jsx(ElementBefore, {
173
+ icon: icon,
174
+ title: title
175
+ }),
176
+ isSelected: selected,
177
+ "aria-describedby": title,
178
+ ref: ref,
179
+ testId: "element-item-".concat(index)
180
+ }, jsx(ItemContent, {
181
+ style: inlineMode ? null : itemStyleOverrides,
182
+ tabIndex: 0,
183
+ title: title,
184
+ description: description,
185
+ keyshortcut: keyshortcut
186
+ })));
187
+ }
188
+
189
+ /**
190
+ * Inline mode should use the existing Align-items:center value.
191
+ */
192
+ var itemStyleOverrides = {
193
+ alignItems: 'flex-start'
194
+ };
195
+ var ElementBefore = /*#__PURE__*/memo(function (_ref5) {
196
+ var icon = _ref5.icon,
197
+ title = _ref5.title;
198
+ return jsx("div", {
199
+ css: [itemIcon, itemIconStyle]
200
+ }, icon ? icon() : jsx(IconFallback, null));
201
+ });
202
+ var ItemContent = /*#__PURE__*/memo(function (_ref6) {
203
+ var title = _ref6.title,
204
+ description = _ref6.description,
205
+ keyshortcut = _ref6.keyshortcut;
206
+ return jsx("div", {
207
+ css: itemBody,
208
+ className: "item-body"
209
+ }, jsx("div", {
210
+ css: itemText
211
+ }, jsx("div", {
212
+ css: itemTitleWrapper
213
+ }, jsx("p", {
214
+ css: itemTitle
215
+ }, title), jsx("div", {
216
+ css: itemAfter
217
+ }, keyshortcut && jsx("div", {
218
+ css: shortcutStyle
219
+ }, keyshortcut))), description && jsx("p", {
220
+ css: itemDescription
221
+ }, description)));
222
+ });
223
+ var elementItemsWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n flex-flow: row wrap;\n align-items: flex-start;\n justify-content: flex-start;\n overflow: hidden;\n padding: ", "px; // For Focus outline\n\n .ReactVirtualized__Collection {\n border-radius: 3px; // Standard border-radius across other components like Search or Item.\n outline: none;\n\n :focus {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n .ReactVirtualized__Collection__innerScrollContainer {\n div[class='element-item-wrapper']:last-child {\n padding-bottom: ", ";\n }\n }\n"])), ELEMENT_LIST_PADDING, ELEMENT_LIST_PADDING, "var(--ds-border-focused, ".concat(B100, ")"), "var(--ds-space-050, 4px)");
224
+ var elementItemWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n div {\n button {\n height: 75px;\n align-items: flex-start;\n padding: ", " ", " 11px;\n }\n }\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)");
225
+ var itemBody = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n width: 100%;\n\n margin-top: -2px; // Fixes the Item Icon and text's alignment issue\n"])));
226
+
227
+ /*
228
+ * -webkit-line-clamp is also supported by firefox 🎉
229
+ * https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/68#CSS
230
+ */
231
+ var multilineStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])));
232
+ var itemDescription = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", ";\n\n overflow: hidden;\n font-size: ", ";\n color: ", ";\n margin-top: ", ";\n"])), multilineStyle, relativeFontSizeToBase16(11.67), "var(--ds-text-subtle, ".concat(N200, ")"), "var(--ds-space-025, 2px)");
233
+ var itemText = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: inherit;\n white-space: initial;\n"])));
234
+ var itemTitleWrapper = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between; // Title and keyboardshortcut are rendered in the same block\n"])));
235
+ var itemTitle = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 100%;\n overflow: hidden;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n"])));
236
+ var itemAfter = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
237
+ var itemIconStyle = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n img {\n height: 40px;\n width: 40px;\n object-fit: cover;\n }\n"])));
238
+ var MemoizedElementListWithAnalytics = /*#__PURE__*/memo(withAnalyticsContext({
239
+ component: 'ElementList'
240
+ })(ElementList));
241
+ export default MemoizedElementListWithAnalytics;
@@ -0,0 +1,40 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
+ /** @jsx jsx */
4
+ import { css, jsx } from '@emotion/react';
5
+ import { FormattedMessage } from 'react-intl-next';
6
+ import Button from '@atlaskit/button';
7
+ import NotFoundIllustration from './NotFoundIllustration';
8
+ export default function EmptyState(_ref) {
9
+ var onExternalLinkClick = _ref.onExternalLinkClick;
10
+ return jsx("div", {
11
+ css: emptyStateWrapper
12
+ }, jsx(NotFoundIllustration, null), jsx("div", {
13
+ css: emptyStateHeading
14
+ }, jsx(FormattedMessage, {
15
+ id: "fabric.editor.elementbrowser.search.empty-state.heading",
16
+ defaultMessage: "Nothing matches your search",
17
+ description: "Empty state heading"
18
+ })), jsx("div", {
19
+ css: emptyStateSubHeading
20
+ }, jsx("p", null, jsx(FormattedMessage, {
21
+ id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
22
+ defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
23
+ description: "Empty state sub-heading"
24
+ })), jsx("div", {
25
+ css: externalLinkWrapper
26
+ }, jsx(Button, {
27
+ appearance: "primary",
28
+ target: "_blank",
29
+ href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
30
+ onClick: onExternalLinkClick
31
+ }, jsx(FormattedMessage, {
32
+ id: "fabric.editor.elementbrowser.search.empty-state.sub-heading.link",
33
+ defaultMessage: "Explore Atlassian Marketplace",
34
+ description: "Empty state sub-heading external link"
35
+ })))));
36
+ }
37
+ var emptyStateHeading = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 1.42857em;\n line-height: 1.2;\n color: ", ";\n font-weight: 500;\n letter-spacing: -0.008em;\n margin-top: 28px;\n"])), "var(--ds-text, rgb(23, 43, 77))");
38
+ var emptyStateSubHeading = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: ", ";\n max-width: 400px;\n text-align: center;\n"])), "var(--ds-space-200, 16px)");
39
+ var emptyStateWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n"])));
40
+ var externalLinkWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 14px;\n"])));
@@ -0,0 +1,63 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ /** @jsx jsx */
4
+ import { css, jsx } from '@emotion/react';
5
+ var imageContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 120px;\n height: 111px;\n margin-top: ", ";\n"])), "var(--ds-space-600, 48px)");
6
+
7
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
8
+ export default function NotFoundIllustration() {
9
+ return jsx("div", {
10
+ css: imageContainer
11
+ }, jsx("svg", {
12
+ width: "120",
13
+ height: "111",
14
+ fill: "none",
15
+ xmlns: "http://www.w3.org/2000/svg"
16
+ }, jsx("g", {
17
+ clipPath: "url(#clip0)"
18
+ }, jsx("path", {
19
+ fill: "#fff",
20
+ fillOpacity: ".01",
21
+ d: "M0 0h120v110.365H0z"
22
+ }), jsx("path", {
23
+ opacity: ".3",
24
+ d: "M60.985 110.336c-.539.017-1.078.029-1.616.035a1.359 1.359 0 01-1.367-1.36 1.361 1.361 0 011.314-1.372h.041a50.876 50.876 0 0010.276-1.105 1.367 1.367 0 01.568 2.674 54.422 54.422 0 01-9.216 1.128zM52 109.877c-.075 0-.156 0-.237-.012a52.688 52.688 0 01-10.583-2.61 1.368 1.368 0 01.92-2.575c3.245 1.169 6.616 2 10.034 2.471.747.104 1.268.79 1.164 1.54A1.36 1.36 0 0152 109.877zM77.088 107.162a1.364 1.364 0 01-1.326-.895 1.366 1.366 0 01.805-1.755 50.423 50.423 0 009.274-4.575 1.358 1.358 0 011.877.43c.4.64.208 1.482-.429 1.884a53.25 53.25 0 01-9.772 4.824 1.26 1.26 0 01-.429.087zM34.9 104.32a1.359 1.359 0 01-.683-.157 53.29 53.29 0 01-9.042-6.092 1.369 1.369 0 01-.18-1.924 1.357 1.357 0 011.918-.18 50.483 50.483 0 008.578 5.778c.667.354.916 1.18.562 1.848a1.337 1.337 0 01-1.152.727zM20.732 93.23a1.372 1.372 0 01-1.06-.448 53.223 53.223 0 01-6.436-8.818 1.37 1.37 0 01.487-1.872 1.36 1.36 0 011.865.489 50.724 50.724 0 006.105 8.364 1.366 1.366 0 01-.098 1.93c-.25.226-.556.343-.863.354zM104.093 84.196a1.367 1.367 0 01-1.228-2.046 50.41 50.41 0 004.183-9.48 1.358 1.358 0 011.714-.878 1.365 1.365 0 01.875 1.72 53.17 53.17 0 01-4.414 9.993 1.34 1.34 0 01-1.13.691zM11.18 77.965a1.365 1.365 0 01-1.31-.854 52.827 52.827 0 01-3.029-10.498 1.362 1.362 0 112.682-.483 50.732 50.732 0 002.873 9.958 1.363 1.363 0 01-1.216 1.877zM110.17 67.218a1.362 1.362 0 01-1.39-1.593c.579-3.395.805-6.876.683-10.347l-.006-.116a1.36 1.36 0 011.315-1.412 1.359 1.359 0 011.408 1.32l.006.115a54.054 54.054 0 01-.724 10.905 1.36 1.36 0 01-1.292 1.128zM7.426 60.3c-.753.03-1.384-.534-1.407-1.29v-.058a53.82 53.82 0 01.712-10.846 1.368 1.368 0 011.57-1.122c.741.128 1.24.83 1.118 1.575a51.307 51.307 0 00-.678 10.288c.029.762-.562 1.425-1.315 1.453zM110.06 49.076a1.363 1.363 0 01-1.385-1.122 50.567 50.567 0 00-2.884-9.95c-.284-.698.052-1.5.747-1.785a1.365 1.365 0 011.778.75 53.085 53.085 0 013.041 10.497 1.37 1.37 0 01-1.094 1.593l-.203.017zM9.888 42.462a1.452 1.452 0 01-.47-.065 1.365 1.365 0 01-.874-1.72 53.157 53.157 0 014.402-9.998 1.362 1.362 0 011.86-.511c.655.372.88 1.209.51 1.866a50.68 50.68 0 00-4.177 9.486 1.37 1.37 0 01-1.251.941zM103.815 32.179a1.355 1.355 0 01-1.222-.674 50.958 50.958 0 00-6.117-8.359 1.366 1.366 0 01.099-1.93 1.355 1.355 0 011.923.099 53.449 53.449 0 016.447 8.806 1.37 1.37 0 01-.487 1.872 1.432 1.432 0 01-.643.186zM18.31 26.529a1.372 1.372 0 01-1.124-2.209 53.551 53.551 0 017.537-7.888 1.363 1.363 0 011.923.157 1.375 1.375 0 01-.156 1.93 51.072 51.072 0 00-7.154 7.487 1.343 1.343 0 01-1.025.523zM92.172 18.444a1.352 1.352 0 01-.915-.314 50.861 50.861 0 00-8.59-5.772 1.368 1.368 0 01-.568-1.849 1.364 1.364 0 011.842-.57 53.153 53.153 0 019.048 6.08c.58.483.66 1.343.18 1.925a1.366 1.366 0 01-.997.5zM31.64 14.433a1.368 1.368 0 01-.776-2.523 53.107 53.107 0 019.771-4.836 1.359 1.359 0 011.75.808c.26.71-.099 1.494-.805 1.755a50.203 50.203 0 00-9.269 4.587c-.208.133-.44.203-.672.209zM76.555 9.51a1.257 1.257 0 01-.504-.082A50.06 50.06 0 0066.013 6.97a1.364 1.364 0 01-1.165-1.54 1.364 1.364 0 011.535-1.168 52.623 52.623 0 0110.584 2.592 1.369 1.369 0 01-.412 2.657zM48.287 7.65a1.367 1.367 0 01-.33-2.703 54.261 54.261 0 0110.827-1.18 1.367 1.367 0 011.372 1.36 1.367 1.367 0 01-1.314 1.377H58.8A50.85 50.85 0 0048.525 7.62c-.081.018-.162.024-.238.03z",
25
+ fill: "#B3BAC5"
26
+ }), jsx("path", {
27
+ opacity: ".3",
28
+ d: "M110.523 19.873a.304.304 0 01-.226-.325l.035-.262c.029-.168.064-.348.11-.534a4.423 4.423 0 01.95-1.796c.458-.53 1.118-.971 1.97-1.314l1.436-.587c.858-.343 1.385-.913 1.593-1.697a2.48 2.48 0 00.07-.878 1.998 1.998 0 00-.273-.849c-.156-.261-.37-.5-.654-.709a3.07 3.07 0 00-1.049-.477c-.451-.116-.851-.133-1.21-.052a2.56 2.56 0 00-.956.43c-.278.204-.51.465-.695.78-.191.313-.33.65-.423.999-.029.104-.052.21-.07.302a.459.459 0 01-.59.355l-2.219-.68a.464.464 0 01-.33-.483c.006-.07.017-.14.029-.21.035-.197.075-.383.121-.569.174-.668.47-1.29.887-1.866a5.14 5.14 0 011.546-1.412c.614-.366 1.31-.605 2.097-.72.788-.117 1.645-.047 2.578.197.967.256 1.778.622 2.433 1.098.66.477 1.176 1.012 1.552 1.599.377.593.614 1.22.707 1.889.093.668.058 1.32-.11 1.953-.261 1-.712 1.796-1.344 2.389a6.773 6.773 0 01-2.288 1.39l-1.211.458c-.341.11-.851.338-1.274.803-.041.046-.214.238-.388.534-.128.221-.22.436-.284.622a.303.303 0 01-.365.192l-2.155-.57zm-1.772 3.412c.145-.552.457-.97.944-1.26a1.942 1.942 0 011.552-.222c.551.146.968.465 1.257.96.29.493.359 1.017.215 1.569a1.966 1.966 0 01-.956 1.25 2.005 2.005 0 01-1.558.203 1.957 1.957 0 01-1.246-.942 1.98 1.98 0 01-.208-1.558zM10.722 12.393a.301.301 0 01-.203-.338l.053-.261c.04-.169.086-.343.15-.523a4.334 4.334 0 011.072-1.727c.492-.5 1.176-.889 2.056-1.18l1.472-.488c.874-.285 1.442-.814 1.703-1.587.092-.279.139-.57.127-.872a2.052 2.052 0 00-.214-.866 2.285 2.285 0 00-.609-.75c-.266-.226-.608-.406-1.013-.546-.44-.151-.846-.192-1.205-.134a2.518 2.518 0 00-1.726 1.099 3.583 3.583 0 00-.585 1.267.461.461 0 01-.615.314L9.02 4.976a.467.467 0 01-.295-.506c.011-.07.029-.14.046-.21a5.65 5.65 0 01.162-.557A5.505 5.505 0 019.946 1.9 5.246 5.246 0 0111.579.593a5.545 5.545 0 012.138-.576c.793-.058 1.645.064 2.554.372.945.32 1.732.739 2.358 1.262.626.523 1.106 1.087 1.442 1.703.336.616.533 1.255.58 1.93a4.97 4.97 0 01-.244 1.941c-.33.982-.828 1.744-1.506 2.29a6.844 6.844 0 01-2.375 1.233l-1.24.372a2.94 2.94 0 00-1.326.715c-.046.046-.232.226-.423.505-.145.215-.249.419-.324.599a.3.3 0 01-.377.168l-2.114-.714zm-1.998 3.284a2 2 0 011.025-1.198 1.957 1.957 0 011.564-.116c.539.18.933.529 1.188 1.04.254.512.29 1.041.11 1.582-.18.54-.528.935-1.037 1.18a2.019 2.019 0 01-1.57.098 1.96 1.96 0 01-1.182-1.029 1.99 1.99 0 01-.098-1.557zM7.177 104.849a.298.298 0 01-.37-.134c-.041-.076-.082-.157-.122-.238a8.207 8.207 0 01-.215-.5 4.405 4.405 0 01-.249-2.017c.076-.698.36-1.436.863-2.215l.84-1.308c.504-.773.614-1.546.33-2.307a2.6 2.6 0 00-.446-.762 2.019 2.019 0 00-.706-.54 2.421 2.421 0 00-.944-.204 3.05 3.05 0 00-1.13.215c-.434.163-.776.378-1.025.657-.25.273-.423.576-.533.901-.11.326-.15.674-.128 1.04.024.367.099.721.226 1.064.04.105.076.198.116.285a.466.466 0 01-.278.634l-2.201.72a.455.455 0 01-.545-.209c-.034-.064-.063-.128-.098-.192a5.595 5.595 0 01-.568-2.575 5.09 5.09 0 01.458-2.046c.29-.65.724-1.25 1.303-1.796.58-.546 1.32-.988 2.225-1.32.938-.348 1.807-.517 2.618-.505.81.012 1.54.151 2.19.413a4.62 4.62 0 011.656 1.139c.458.494.8 1.046 1.025 1.662.36.971.446 1.884.267 2.732-.18.85-.539 1.669-1.078 2.46l-.73 1.075c-.214.29-.503.767-.585 1.389-.005.064-.04.319-.011.657.023.255.07.482.127.668a.309.309 0 01-.19.372l-2.092.785zm.504 3.813a2.026 2.026 0 01.052-1.581 1.958 1.958 0 011.147-1.076 1.986 1.986 0 011.576.064c.521.239.88.628 1.077 1.163a1.947 1.947 0 01-.07 1.569 2.028 2.028 0 01-1.158 1.064 1.977 1.977 0 01-1.564-.052 1.96 1.96 0 01-1.06-1.151z",
29
+ fill: "#C1C7D0"
30
+ }), jsx("path", {
31
+ d: "M86.519 77.651l-4.142-4.028-5.578 5.784 4.141 4.028a7.812 7.812 0 012.15 3.772 7.858 7.858 0 002.148 3.773l16.816 16.333a6.405 6.405 0 009.077-.145 6.46 6.46 0 00-.144-9.108L94.171 81.726a7.786 7.786 0 00-3.83-2.034 7.9 7.9 0 01-3.822-2.04z",
32
+ fill: "#CFD4DB"
33
+ }), jsx("path", {
34
+ d: "M90.18 79.64a7.756 7.756 0 01-3.656-1.995l-1.262-1.226a4 4 0 00-5.671.093 4.032 4.032 0 00.092 5.69l1.263 1.227a7.853 7.853 0 012.103 3.598 33.606 33.606 0 003.858-3.435 33.629 33.629 0 003.273-3.953z",
35
+ fill: "#B3BAC5"
36
+ }), jsx("path", {
37
+ d: "M59.056 90.677c-8.961.146-17.442-3.22-23.877-9.474-13.295-12.91-13.636-34.266-.77-47.606C40.64 27.14 49.01 23.501 57.966 23.35c8.961-.145 17.441 3.22 23.877 9.475 6.441 6.255 10.062 14.654 10.212 23.64.145 8.992-3.209 17.502-9.442 23.96-6.227 6.47-14.597 10.108-23.558 10.253zM58.1 31.388c-6.824.11-13.19 2.883-17.94 7.801-9.795 10.155-9.534 26.413.585 36.242 4.9 4.76 11.36 7.324 18.183 7.213 6.824-.11 13.19-2.883 17.94-7.8 4.744-4.918 7.299-11.399 7.189-18.246-.11-6.847-2.873-13.236-7.774-18.002-4.906-4.755-11.36-7.318-18.183-7.208z",
38
+ fill: "url(#paint0_linear)"
39
+ }), jsx("path", {
40
+ d: "M68.886 49.535l-3.093-3.051a1.158 1.158 0 00-1.64.017l-5.67 5.796-5.776-5.691a1.158 1.158 0 00-1.64.017l-3.04 3.104c-.446.46-.44 1.192.017 1.645l5.775 5.69-5.67 5.796c-.447.46-.44 1.192.017 1.645l3.093 3.052a1.158 1.158 0 001.64-.018l5.67-5.795 5.775 5.69a1.158 1.158 0 001.64-.017l3.04-3.104c.447-.459.441-1.191-.017-1.645l-5.775-5.69 5.671-5.795c.446-.46.44-1.198-.017-1.645z",
41
+ fill: "#C1C7D0"
42
+ })), jsx("defs", null, jsx("linearGradient", {
43
+ id: "paint0_linear",
44
+ x1: "34.792",
45
+ y1: "80.822",
46
+ x2: "82.401",
47
+ y2: "33.377",
48
+ gradientUnits: "userSpaceOnUse"
49
+ }, jsx("stop", {
50
+ offset: ".557",
51
+ stopColor: "#C1C7D0"
52
+ }), jsx("stop", {
53
+ offset: ".966",
54
+ stopColor: "#E9EBEF",
55
+ stopOpacity: ".5"
56
+ })), jsx("clipPath", {
57
+ id: "clip0"
58
+ }, jsx("path", {
59
+ fill: "#fff",
60
+ d: "M0 0h120v110.365H0z"
61
+ })))));
62
+ }
63
+ /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
@@ -0,0 +1,37 @@
1
+ import { ELEMENT_ITEM_HEIGHT } from '../../constants';
2
+ import { generateVirtualizedContainerDatum } from './utils';
3
+
4
+ /**
5
+ * Callback responsible for returning size and offset/position information
6
+ * for a given cell.
7
+ * https://github.com/bvaughn/react-virtualized/blob/master/docs/Collection.md
8
+ **/
9
+ export default function cellSizeAndPositionGetter(containerWidth, scrollbarWidth) {
10
+ var GUTTER_SIZE = 4;
11
+ /**
12
+ * Save the currently rendered columnY positions.
13
+ * Have to be within the current render scope.
14
+ */
15
+ var columnYMap = [];
16
+ return function (_ref) {
17
+ var index = _ref.index;
18
+ var _generateVirtualizedC = generateVirtualizedContainerDatum(containerWidth, {
19
+ gutterSize: GUTTER_SIZE,
20
+ scrollbarWidth: scrollbarWidth
21
+ }),
22
+ columnCount = _generateVirtualizedC.columnCount,
23
+ availableWidth = _generateVirtualizedC.availableWidth;
24
+ var width = Math.floor(availableWidth / columnCount);
25
+ var height = ELEMENT_ITEM_HEIGHT;
26
+ var columnPosition = index % (columnCount || 1);
27
+ var x = columnPosition * width;
28
+ var y = columnYMap[columnPosition] || 0;
29
+ columnYMap[columnPosition] = y + height;
30
+ return {
31
+ height: height,
32
+ width: width,
33
+ x: x,
34
+ y: y
35
+ };
36
+ };
37
+ }
@@ -0,0 +1,46 @@
1
+ import { ELEMENT_LIST_PADDING, FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS, SCROLLBAR_WIDTH } from '../../constants';
2
+ export function getColumnCount(clientWidth) {
3
+ var small = FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS.small,
4
+ medium = FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS.medium,
5
+ large = FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS.large;
6
+ switch (true) {
7
+ case clientWidth < small:
8
+ return 1;
9
+ case clientWidth >= small && clientWidth < medium:
10
+ return Math.floor(clientWidth / 200);
11
+ case clientWidth >= large:
12
+ return Math.floor(clientWidth / 248);
13
+ default:
14
+ return Math.floor(clientWidth / 220);
15
+ }
16
+ }
17
+ export function generateVirtualizedContainerDatum(containerWidth, options) {
18
+ var scrollbarWidth = options.scrollbarWidth;
19
+ var columnCount = getColumnCount(containerWidth);
20
+ var availableWidth = containerWidth - (scrollbarWidth + ELEMENT_LIST_PADDING);
21
+ return {
22
+ availableWidth: availableWidth,
23
+ columnCount: columnCount
24
+ };
25
+ }
26
+ var CALCULATED_SCROLLBAR_WIDTH;
27
+ export function getScrollbarWidth() {
28
+ if (!CALCULATED_SCROLLBAR_WIDTH) {
29
+ var _container$parentNode;
30
+ var container = document.createElement('div');
31
+ container.style.visibility = 'hidden';
32
+ container.style.overflow = 'scroll';
33
+ document.body.appendChild(container);
34
+ var innerContainer = document.createElement('div');
35
+ container.appendChild(innerContainer);
36
+ var scrollbarWidth = container.offsetWidth - innerContainer.offsetWidth;
37
+ (_container$parentNode = container.parentNode) === null || _container$parentNode === void 0 ? void 0 : _container$parentNode.removeChild(container);
38
+ if (scrollbarWidth) {
39
+ CALCULATED_SCROLLBAR_WIDTH = scrollbarWidth;
40
+ return scrollbarWidth;
41
+ }
42
+ return SCROLLBAR_WIDTH;
43
+ } else {
44
+ return CALCULATED_SCROLLBAR_WIDTH;
45
+ }
46
+ }
@@ -0,0 +1,77 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
+ /** @jsx jsx */
4
+ import React, { memo } from 'react';
5
+ import { css, jsx } from '@emotion/react';
6
+ import { injectIntl } from 'react-intl-next';
7
+ import { withAnalyticsContext } from '@atlaskit/analytics-next';
8
+ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
+ import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
10
+ import SearchIcon from '@atlaskit/icon/glyph/search';
11
+ import Textfield from '@atlaskit/textfield';
12
+ import { N200 } from '@atlaskit/theme/colors';
13
+ import { GRID_SIZE, SEARCH_ITEM_HEIGHT_WIDTH } from '../constants';
14
+ import useFocus from '../hooks/use-focus';
15
+ import { Modes } from '../types';
16
+ function ElementSearch(_ref) {
17
+ var onSearch = _ref.onSearch,
18
+ mode = _ref.mode,
19
+ formatMessage = _ref.intl.formatMessage,
20
+ focus = _ref.focus,
21
+ onClick = _ref.onClick,
22
+ onKeyDown = _ref.onKeyDown,
23
+ searchTerm = _ref.searchTerm;
24
+ var ref = useFocus(focus);
25
+ var onChange = function onChange(_ref2) {
26
+ var value = _ref2.target.value;
27
+ onSearch(value);
28
+ };
29
+ var onFocus = function onFocus(e) {};
30
+ var onBlur = function onBlur(e) {};
31
+ return jsx("div", {
32
+ css: [wrapper, mode === Modes.inline && wrapperInline]
33
+ }, jsx(Textfield, {
34
+ ref: ref,
35
+ onChange: onChange,
36
+ onClick: onClick,
37
+ onFocus: onFocus,
38
+ onKeyDown: onKeyDown,
39
+ onBlur: onBlur,
40
+ elemBeforeInput: jsx("div", {
41
+ css: elementBeforeInput,
42
+ "data-testid": "element_search__element_before_input"
43
+ }, jsx(SearchIcon, {
44
+ size: "medium",
45
+ label: "Advanced search",
46
+ primaryColor: "inherit"
47
+ })),
48
+ elemAfterInput: jsx("div", {
49
+ css: elementAfterInput,
50
+ "data-testid": "element_search__element_after_input"
51
+ }, jsx("div", {
52
+ css: styledShortcut
53
+ }, "\u23CE ", formatMessage(elementAfterInputMessage))),
54
+ placeholder: formatMessage(placeHolderMessage),
55
+ "aria-label": "search",
56
+ value: searchTerm
57
+ }));
58
+ }
59
+ var elementAfterInputMessage = {
60
+ id: 'fabric.editor.elementbrowser.searchbar.elementAfterInput',
61
+ defaultMessage: 'Enter',
62
+ description: 'Enter to insert'
63
+ };
64
+ var placeHolderMessage = {
65
+ id: 'fabric.editor.elementbrowser.searchbar.placeholder',
66
+ defaultMessage: 'Search',
67
+ description: 'Search field placeholder'
68
+ };
69
+ var styledShortcut = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n padding: ", "px ", "px;\n width: ", "px;\n"])), shortcutStyle, GRID_SIZE / 2, GRID_SIZE, GRID_SIZE * 6);
70
+ var wrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & > [data-ds--text-field--container] {\n height: ", "px;\n border-radius: ", "px;\n flex: 1 1 100%;\n overflow: visible;\n & > [data-ds--text-field--input] {\n margin-bottom: 3px;\n font-size: ", ";\n padding: ", "px ", " ", "px 0;\n }\n }\n"])), GRID_SIZE * 6, GRID_SIZE, relativeFontSizeToBase16(14), GRID_SIZE, "var(--ds-space-075, 6px)", GRID_SIZE);
71
+ var wrapperInline = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n & > [data-ds--text-field--container] {\n height: ", "px;\n flex: none;\n overflow: revert;\n }\n"])), GRID_SIZE * 5);
72
+ var elementBeforeInput = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 1px ", " 0 ", ";\n color: ", ";\n\n // Custom SearchIcon style\n span,\n svg {\n height: 20px;\n width: 20px;\n }\n"])), "var(--ds-space-075, 6px)", "var(--ds-space-100, 8px)", "var(--ds-icon, ".concat(N200, ")"));
73
+ var elementAfterInput = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0 ", ";\n height: ", ";\n text-align: center;\n"])), "var(--ds-space-100, 8px)", SEARCH_ITEM_HEIGHT_WIDTH);
74
+ var MemoizedElementSearchWithAnalytics = /*#__PURE__*/memo(withAnalyticsContext({
75
+ component: 'Searchbar'
76
+ })(injectIntl(ElementSearch)));
77
+ export default MemoizedElementSearchWithAnalytics;