@atlaskit/editor-common 76.24.3 → 76.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/card/LinkToolbarButtonGroup.js +5 -6
- package/dist/cjs/element-browser/ViewMore.js +3 -4
- package/dist/cjs/element-browser/components/CategoryList.js +4 -5
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +2 -3
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +20 -21
- package/dist/cjs/element-browser/components/ElementList/EmptyState.js +8 -9
- package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +15 -16
- package/dist/cjs/element-browser/components/ElementSearch.js +6 -7
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +21 -22
- package/dist/cjs/element-browser/hooks/use-container-width.js +2 -3
- package/dist/cjs/keymaps/index.js +1 -2
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +21 -22
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +5 -6
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +9 -11
- package/dist/cjs/media-inline/inline-image-wrapper.js +1 -3
- package/dist/cjs/media-inline/media-inline-image-card.js +0 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +5 -8
- package/dist/cjs/ui/Caption/index.js +2 -3
- package/dist/cjs/ui/DropList/index.js +6 -6
- package/dist/cjs/ui/Expand/index.js +3 -5
- package/dist/cjs/ui/FloatingToolbar/Separator.js +1 -2
- package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +2 -3
- package/dist/cjs/ui/MediaSingle/index.js +2 -5
- package/dist/cjs/ui/MediaSingle/styled.js +2 -3
- package/dist/cjs/ui/Messages/index.js +7 -8
- package/dist/cjs/ui/PanelTextInput/index.js +2 -3
- package/dist/cjs/ui/UnsupportedBlock/index.js +4 -5
- package/dist/cjs/ui/UnsupportedInline/index.js +4 -5
- package/dist/cjs/ui/WidthProvider/index.js +4 -4
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +5 -6
- package/dist/cjs/ui-color/ColorPalette/index.js +3 -6
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +9 -10
- package/dist/cjs/ui-menu/DropdownContainer/index.js +3 -3
- package/dist/cjs/ui-menu/DropdownMenu/index.js +18 -19
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +2 -3
- package/dist/cjs/ui-menu/ToolbarButton/index.js +3 -4
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +11 -1
- package/dist/es2019/card/LinkToolbarButtonGroup.js +6 -7
- package/dist/es2019/element-browser/ViewMore.js +4 -5
- package/dist/es2019/element-browser/components/CategoryList.js +4 -6
- package/dist/es2019/element-browser/components/ElementBrowserLoader.js +3 -4
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +21 -22
- package/dist/es2019/element-browser/components/ElementList/EmptyState.js +9 -10
- package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +16 -17
- package/dist/es2019/element-browser/components/ElementSearch.js +7 -8
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +22 -23
- package/dist/es2019/element-browser/hooks/use-container-width.js +3 -4
- package/dist/es2019/keymaps/index.js +2 -3
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +22 -24
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +6 -7
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +9 -10
- package/dist/es2019/media-inline/inline-image-wrapper.js +2 -4
- package/dist/es2019/media-inline/media-inline-image-card.js +0 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +5 -7
- package/dist/es2019/ui/Caption/index.js +3 -4
- package/dist/es2019/ui/DropList/index.js +6 -8
- package/dist/es2019/ui/Expand/index.js +3 -5
- package/dist/es2019/ui/FloatingToolbar/Separator.js +2 -3
- package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +3 -4
- package/dist/es2019/ui/MediaSingle/index.js +2 -4
- package/dist/es2019/ui/MediaSingle/styled.js +3 -5
- package/dist/es2019/ui/Messages/index.js +8 -10
- package/dist/es2019/ui/PanelTextInput/index.js +1 -4
- package/dist/es2019/ui/UnsupportedBlock/index.js +5 -6
- package/dist/es2019/ui/UnsupportedInline/index.js +5 -6
- package/dist/es2019/ui/WidthProvider/index.js +4 -5
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +4 -6
- package/dist/es2019/ui-color/ColorPalette/index.js +2 -4
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +10 -11
- package/dist/es2019/ui-menu/DropdownContainer/index.js +2 -3
- package/dist/es2019/ui-menu/DropdownMenu/index.js +19 -21
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +3 -4
- package/dist/es2019/ui-menu/ToolbarButton/index.js +5 -5
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +8 -2
- package/dist/esm/card/LinkToolbarButtonGroup.js +6 -7
- package/dist/esm/element-browser/ViewMore.js +4 -5
- package/dist/esm/element-browser/components/CategoryList.js +5 -7
- package/dist/esm/element-browser/components/ElementBrowserLoader.js +3 -4
- package/dist/esm/element-browser/components/ElementList/ElementList.js +21 -22
- package/dist/esm/element-browser/components/ElementList/EmptyState.js +9 -10
- package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +16 -17
- package/dist/esm/element-browser/components/ElementSearch.js +7 -8
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +22 -23
- package/dist/esm/element-browser/hooks/use-container-width.js +3 -4
- package/dist/esm/keymaps/index.js +2 -3
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +22 -24
- package/dist/esm/link/LinkSearch/LinkSearchList.js +6 -7
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +9 -10
- package/dist/esm/media-inline/inline-image-wrapper.js +2 -4
- package/dist/esm/media-inline/media-inline-image-card.js +0 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +5 -7
- package/dist/esm/ui/Caption/index.js +3 -4
- package/dist/esm/ui/DropList/index.js +6 -8
- package/dist/esm/ui/Expand/index.js +3 -5
- package/dist/esm/ui/FloatingToolbar/Separator.js +2 -3
- package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +3 -4
- package/dist/esm/ui/MediaSingle/index.js +2 -4
- package/dist/esm/ui/MediaSingle/styled.js +3 -5
- package/dist/esm/ui/Messages/index.js +8 -10
- package/dist/esm/ui/PanelTextInput/index.js +1 -4
- package/dist/esm/ui/UnsupportedBlock/index.js +5 -6
- package/dist/esm/ui/UnsupportedInline/index.js +5 -6
- package/dist/esm/ui/WidthProvider/index.js +4 -5
- package/dist/esm/ui-color/ColorPalette/Color/index.js +4 -6
- package/dist/esm/ui-color/ColorPalette/index.js +3 -5
- package/dist/esm/ui-menu/ColorPickerButton/index.js +10 -11
- package/dist/esm/ui-menu/DropdownContainer/index.js +2 -3
- package/dist/esm/ui-menu/DropdownMenu/index.js +19 -21
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +3 -4
- package/dist/esm/ui-menu/ToolbarButton/index.js +5 -5
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +12 -2
- package/dist/types/extensions/types/field-definitions.d.ts +2 -2
- package/dist/types-ts4.5/extensions/types/field-definitions.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
|
|
6
5
|
import { Collection } from 'react-virtualized/dist/commonjs/Collection';
|
|
7
6
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -87,12 +86,12 @@ function ElementList({
|
|
|
87
86
|
if (items[index] == null) {
|
|
88
87
|
return;
|
|
89
88
|
}
|
|
90
|
-
return
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
91
90
|
style: style,
|
|
92
91
|
key: key,
|
|
93
92
|
className: "element-item-wrapper",
|
|
94
93
|
css: elementItemWrapper
|
|
95
|
-
},
|
|
94
|
+
}, /*#__PURE__*/React.createElement(MemoizedElementItem, _extends({
|
|
96
95
|
inlineMode: !fullMode,
|
|
97
96
|
index: index,
|
|
98
97
|
item: items[index],
|
|
@@ -100,20 +99,20 @@ function ElementList({
|
|
|
100
99
|
focus: focusedItemIndex === index
|
|
101
100
|
}, props)));
|
|
102
101
|
}, [items, fullMode, selectedItemIndex, focusedItemIndex, props]);
|
|
103
|
-
return
|
|
102
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(ContainerWidthMonitor, null), !items.length ? emptyStateHandler ? emptyStateHandler({
|
|
104
103
|
mode,
|
|
105
104
|
selectedCategory,
|
|
106
105
|
searchTerm
|
|
107
|
-
}) :
|
|
106
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
108
107
|
onExternalLinkClick: onExternalLinkClick
|
|
109
|
-
}) :
|
|
108
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
110
109
|
css: elementItemsWrapper,
|
|
111
110
|
"data-testid": "element-items"
|
|
112
|
-
},
|
|
111
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, containerWidth > 0 && /*#__PURE__*/React.createElement(AutoSizer, {
|
|
113
112
|
disableWidth: true
|
|
114
113
|
}, ({
|
|
115
114
|
height
|
|
116
|
-
}) =>
|
|
115
|
+
}) => /*#__PURE__*/React.createElement(Collection, {
|
|
117
116
|
cellCount: items.length,
|
|
118
117
|
cellRenderer: cellRenderer,
|
|
119
118
|
cellSizeAndPositionGetter: cellSizeAndPositionGetter(containerWidth - ELEMENT_LIST_PADDING * 2, scrollbarWidth),
|
|
@@ -175,12 +174,12 @@ export function ElementItem({
|
|
|
175
174
|
description,
|
|
176
175
|
keyshortcut
|
|
177
176
|
} = item;
|
|
178
|
-
return
|
|
177
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
179
178
|
content: description,
|
|
180
179
|
testId: `element-item-tooltip-${index}`
|
|
181
|
-
},
|
|
180
|
+
}, /*#__PURE__*/React.createElement(ButtonItem, {
|
|
182
181
|
onClick: onClick,
|
|
183
|
-
iconBefore:
|
|
182
|
+
iconBefore: /*#__PURE__*/React.createElement(ElementBefore, {
|
|
184
183
|
icon: icon,
|
|
185
184
|
title: title
|
|
186
185
|
}),
|
|
@@ -188,7 +187,7 @@ export function ElementItem({
|
|
|
188
187
|
"aria-describedby": title,
|
|
189
188
|
ref: ref,
|
|
190
189
|
testId: `element-item-${index}`
|
|
191
|
-
},
|
|
190
|
+
}, /*#__PURE__*/React.createElement(ItemContent, {
|
|
192
191
|
style: inlineMode ? null : itemStyleOverrides,
|
|
193
192
|
tabIndex: 0,
|
|
194
193
|
title: title,
|
|
@@ -206,27 +205,27 @@ const itemStyleOverrides = {
|
|
|
206
205
|
const ElementBefore = /*#__PURE__*/memo(({
|
|
207
206
|
icon,
|
|
208
207
|
title
|
|
209
|
-
}) =>
|
|
208
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
210
209
|
css: [itemIcon, itemIconStyle]
|
|
211
|
-
}, icon ? icon() :
|
|
210
|
+
}, icon ? icon() : /*#__PURE__*/React.createElement(IconFallback, null)));
|
|
212
211
|
const ItemContent = /*#__PURE__*/memo(({
|
|
213
212
|
title,
|
|
214
213
|
description,
|
|
215
214
|
keyshortcut
|
|
216
|
-
}) =>
|
|
215
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
217
216
|
css: itemBody,
|
|
218
217
|
className: "item-body"
|
|
219
|
-
},
|
|
218
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
220
219
|
css: itemText
|
|
221
|
-
},
|
|
220
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
222
221
|
css: itemTitleWrapper
|
|
223
|
-
},
|
|
222
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
224
223
|
css: itemTitle
|
|
225
|
-
}, title),
|
|
224
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
226
225
|
css: itemAfter
|
|
227
|
-
}, keyshortcut &&
|
|
226
|
+
}, keyshortcut && /*#__PURE__*/React.createElement("div", {
|
|
228
227
|
css: shortcutStyle
|
|
229
|
-
}, keyshortcut))), description &&
|
|
228
|
+
}, keyshortcut))), description && /*#__PURE__*/React.createElement("p", {
|
|
230
229
|
css: itemDescription
|
|
231
230
|
}, description))));
|
|
232
231
|
const elementItemsWrapper = css`
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
3
|
import Button from '@atlaskit/button';
|
|
5
4
|
import NotFoundIllustration from './NotFoundIllustration';
|
|
6
5
|
export default function EmptyState({
|
|
7
6
|
onExternalLinkClick
|
|
8
7
|
}) {
|
|
9
|
-
return
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
9
|
css: emptyStateWrapper
|
|
11
|
-
},
|
|
10
|
+
}, /*#__PURE__*/React.createElement(NotFoundIllustration, null), /*#__PURE__*/React.createElement("div", {
|
|
12
11
|
css: emptyStateHeading
|
|
13
|
-
},
|
|
12
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
14
13
|
id: "fabric.editor.elementbrowser.search.empty-state.heading",
|
|
15
14
|
defaultMessage: "Nothing matches your search",
|
|
16
15
|
description: "Empty state heading"
|
|
17
|
-
})),
|
|
16
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
18
17
|
css: emptyStateSubHeading
|
|
19
|
-
},
|
|
18
|
+
}, /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
20
19
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
|
|
21
20
|
defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
|
|
22
21
|
description: "Empty state sub-heading"
|
|
23
|
-
})),
|
|
22
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
24
23
|
css: externalLinkWrapper
|
|
25
|
-
},
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
26
25
|
appearance: "primary",
|
|
27
26
|
target: "_blank",
|
|
28
27
|
href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
|
|
29
28
|
onClick: onExternalLinkClick
|
|
30
|
-
},
|
|
29
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
31
30
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading.link",
|
|
32
31
|
defaultMessage: "Explore Atlassian Marketplace",
|
|
33
32
|
description: "Empty state sub-heading external link"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
import { css } from '@emotion/react';
|
|
3
2
|
const imageContainer = css`
|
|
4
3
|
width: 120px;
|
|
5
4
|
height: 111px;
|
|
@@ -8,56 +7,56 @@ const imageContainer = css`
|
|
|
8
7
|
|
|
9
8
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
10
9
|
export default function NotFoundIllustration() {
|
|
11
|
-
return
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
11
|
css: imageContainer
|
|
13
|
-
},
|
|
12
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
14
13
|
width: "120",
|
|
15
14
|
height: "111",
|
|
16
15
|
fill: "none",
|
|
17
16
|
xmlns: "http://www.w3.org/2000/svg"
|
|
18
|
-
},
|
|
17
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
19
18
|
clipPath: "url(#clip0)"
|
|
20
|
-
},
|
|
19
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
21
20
|
fill: "#fff",
|
|
22
21
|
fillOpacity: ".01",
|
|
23
22
|
d: "M0 0h120v110.365H0z"
|
|
24
|
-
}),
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
24
|
opacity: ".3",
|
|
26
25
|
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",
|
|
27
26
|
fill: "#B3BAC5"
|
|
28
|
-
}),
|
|
27
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
29
28
|
opacity: ".3",
|
|
30
29
|
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",
|
|
31
30
|
fill: "#C1C7D0"
|
|
32
|
-
}),
|
|
31
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
33
32
|
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",
|
|
34
33
|
fill: "#CFD4DB"
|
|
35
|
-
}),
|
|
34
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
36
35
|
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",
|
|
37
36
|
fill: "#B3BAC5"
|
|
38
|
-
}),
|
|
37
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
39
38
|
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",
|
|
40
39
|
fill: "url(#paint0_linear)"
|
|
41
|
-
}),
|
|
40
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
42
41
|
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",
|
|
43
42
|
fill: "#C1C7D0"
|
|
44
|
-
})),
|
|
43
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
45
44
|
id: "paint0_linear",
|
|
46
45
|
x1: "34.792",
|
|
47
46
|
y1: "80.822",
|
|
48
47
|
x2: "82.401",
|
|
49
48
|
y2: "33.377",
|
|
50
49
|
gradientUnits: "userSpaceOnUse"
|
|
51
|
-
},
|
|
50
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
52
51
|
offset: ".557",
|
|
53
52
|
stopColor: "#C1C7D0"
|
|
54
|
-
}),
|
|
53
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
55
54
|
offset: ".966",
|
|
56
55
|
stopColor: "#E9EBEF",
|
|
57
56
|
stopOpacity: ".5"
|
|
58
|
-
})),
|
|
57
|
+
})), /*#__PURE__*/React.createElement("clipPath", {
|
|
59
58
|
id: "clip0"
|
|
60
|
-
},
|
|
59
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
61
60
|
fill: "#fff",
|
|
62
61
|
d: "M0 0h120v110.365H0z"
|
|
63
62
|
})))));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { memo } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { injectIntl } from 'react-intl-next';
|
|
5
4
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
5
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -32,27 +31,27 @@ function ElementSearch({
|
|
|
32
31
|
};
|
|
33
32
|
const onFocus = e => {};
|
|
34
33
|
const onBlur = e => {};
|
|
35
|
-
return
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
35
|
css: [wrapper, mode === Modes.inline && wrapperInline]
|
|
37
|
-
},
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Textfield, {
|
|
38
37
|
ref: ref,
|
|
39
38
|
onChange: onChange,
|
|
40
39
|
onClick: onClick,
|
|
41
40
|
onFocus: onFocus,
|
|
42
41
|
onKeyDown: onKeyDown,
|
|
43
42
|
onBlur: onBlur,
|
|
44
|
-
elemBeforeInput:
|
|
43
|
+
elemBeforeInput: /*#__PURE__*/React.createElement("div", {
|
|
45
44
|
css: elementBeforeInput,
|
|
46
45
|
"data-testid": "element_search__element_before_input"
|
|
47
|
-
},
|
|
46
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
48
47
|
size: "medium",
|
|
49
48
|
label: "Advanced search",
|
|
50
49
|
primaryColor: "inherit"
|
|
51
50
|
})),
|
|
52
|
-
elemAfterInput:
|
|
51
|
+
elemAfterInput: /*#__PURE__*/React.createElement("div", {
|
|
53
52
|
css: elementAfterInput,
|
|
54
53
|
"data-testid": "element_search__element_after_input"
|
|
55
|
-
},
|
|
54
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
55
|
css: styledShortcut
|
|
57
56
|
}, "\u23CE ", formatMessage(elementAfterInputMessage))),
|
|
58
57
|
placeholder: formatMessage(placeHolderMessage),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { memo, useCallback, useEffect, useState } from 'react';
|
|
4
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
5
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
@@ -177,10 +176,10 @@ function StatelessElementBrowser(props) {
|
|
|
177
176
|
onSelectItem(selectedItem);
|
|
178
177
|
}
|
|
179
178
|
}, [onSelectItem, selectedItem]);
|
|
180
|
-
return
|
|
179
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
181
180
|
css: wrapper,
|
|
182
181
|
"data-testid": "element-browser"
|
|
183
|
-
},
|
|
182
|
+
}, /*#__PURE__*/React.createElement(ContainerWidthMonitor, null), containerWidth < DEVICE_BREAKPOINT_NUMBERS.medium ? /*#__PURE__*/React.createElement(MobileBrowser, _extends({}, props, {
|
|
184
183
|
selectedItemIndex: selectedItemIndex,
|
|
185
184
|
focusedItemIndex: focusedItemIndex,
|
|
186
185
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
@@ -191,7 +190,7 @@ function StatelessElementBrowser(props) {
|
|
|
191
190
|
onKeyDown: onKeyDown,
|
|
192
191
|
viewMoreItem: viewMoreItem,
|
|
193
192
|
focusOnViewMore: focusOnViewMore
|
|
194
|
-
})) :
|
|
193
|
+
})) : /*#__PURE__*/React.createElement(DesktopBrowser, _extends({}, props, {
|
|
195
194
|
selectedItemIndex: selectedItemIndex,
|
|
196
195
|
focusedItemIndex: focusedItemIndex,
|
|
197
196
|
setFocusedItemIndex: setFocusedItemIndex,
|
|
@@ -226,29 +225,29 @@ function MobileBrowser({
|
|
|
226
225
|
emptyStateHandler,
|
|
227
226
|
viewMoreItem
|
|
228
227
|
}) {
|
|
229
|
-
return
|
|
228
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
230
229
|
css: mobileElementBrowserContainer,
|
|
231
230
|
onKeyDown: onKeyDown,
|
|
232
231
|
"data-testid": "mobile__element-browser"
|
|
233
|
-
},
|
|
232
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
234
233
|
css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
|
|
235
|
-
}, showSearch &&
|
|
234
|
+
}, showSearch && /*#__PURE__*/React.createElement(ElementSearch, {
|
|
236
235
|
onSearch: onSearch,
|
|
237
236
|
onKeyDown: onKeyPress,
|
|
238
237
|
mode: mode,
|
|
239
238
|
focus: focusOnSearch,
|
|
240
239
|
onClick: setFocusOnSearch,
|
|
241
240
|
searchTerm: searchTerm
|
|
242
|
-
}), showCategories &&
|
|
241
|
+
}), showCategories && /*#__PURE__*/React.createElement("nav", {
|
|
243
242
|
css: mobileCategoryListWrapper,
|
|
244
243
|
tabIndex: -1
|
|
245
|
-
},
|
|
244
|
+
}, /*#__PURE__*/React.createElement(CategoryList, {
|
|
246
245
|
categories: categories,
|
|
247
246
|
onSelectCategory: onSelectCategory,
|
|
248
247
|
selectedCategory: selectedCategory
|
|
249
|
-
}))),
|
|
248
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
250
249
|
css: mobileMainContent
|
|
251
|
-
},
|
|
250
|
+
}, /*#__PURE__*/React.createElement(ElementList, {
|
|
252
251
|
items: items,
|
|
253
252
|
mode: mode,
|
|
254
253
|
onInsertItem: onInsertItem,
|
|
@@ -260,7 +259,7 @@ function MobileBrowser({
|
|
|
260
259
|
emptyStateHandler: emptyStateHandler,
|
|
261
260
|
selectedCategory: selectedCategory,
|
|
262
261
|
searchTerm: searchTerm
|
|
263
|
-
})), viewMoreItem &&
|
|
262
|
+
})), viewMoreItem && /*#__PURE__*/React.createElement(ViewMore, {
|
|
264
263
|
item: viewMoreItem,
|
|
265
264
|
focus: focusOnViewMore
|
|
266
265
|
}));
|
|
@@ -287,39 +286,39 @@ function DesktopBrowser({
|
|
|
287
286
|
createAnalyticsEvent,
|
|
288
287
|
emptyStateHandler
|
|
289
288
|
}) {
|
|
290
|
-
return
|
|
289
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
291
290
|
css: elementBrowserContainer,
|
|
292
291
|
"data-testid": "desktop__element-browser"
|
|
293
|
-
}, showCategories &&
|
|
292
|
+
}, showCategories && /*#__PURE__*/React.createElement("div", {
|
|
294
293
|
css: showCategories ? sideBarShowCategories : sideBar
|
|
295
|
-
},
|
|
294
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
296
295
|
css: sidebarHeading,
|
|
297
296
|
"data-testid": "sidebar-heading"
|
|
298
|
-
},
|
|
297
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
299
298
|
id: "fabric.editor.elementbrowser.sidebar.heading",
|
|
300
299
|
defaultMessage: "Browse",
|
|
301
300
|
description: "Sidebar heading"
|
|
302
|
-
})),
|
|
301
|
+
})), /*#__PURE__*/React.createElement("nav", {
|
|
303
302
|
css: categoryListWrapper
|
|
304
|
-
},
|
|
303
|
+
}, /*#__PURE__*/React.createElement(CategoryList, {
|
|
305
304
|
categories: categories,
|
|
306
305
|
onSelectCategory: onSelectCategory,
|
|
307
306
|
selectedCategory: selectedCategory,
|
|
308
307
|
createAnalyticsEvent: createAnalyticsEvent
|
|
309
|
-
}))),
|
|
308
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
310
309
|
css: mainContent,
|
|
311
310
|
onKeyDown: onKeyDown,
|
|
312
311
|
"data-testid": "main-content"
|
|
313
|
-
}, showSearch &&
|
|
312
|
+
}, showSearch && /*#__PURE__*/React.createElement("div", {
|
|
314
313
|
css: searchContainer
|
|
315
|
-
},
|
|
314
|
+
}, /*#__PURE__*/React.createElement(ElementSearch, {
|
|
316
315
|
onSearch: onSearch,
|
|
317
316
|
onKeyDown: onKeyPress,
|
|
318
317
|
mode: mode,
|
|
319
318
|
focus: focusOnSearch,
|
|
320
319
|
onClick: setFocusOnSearch,
|
|
321
320
|
searchTerm: searchTerm
|
|
322
|
-
})),
|
|
321
|
+
})), /*#__PURE__*/React.createElement(ElementList, {
|
|
323
322
|
items: items,
|
|
324
323
|
mode: mode,
|
|
325
324
|
onInsertItem: onInsertItem,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { memo, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -44,11 +43,11 @@ export default function useContainerWidth() {
|
|
|
44
43
|
}
|
|
45
44
|
}, [ref]);
|
|
46
45
|
const ContainerWidthMonitor = /*#__PURE__*/memo(() => {
|
|
47
|
-
return
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
47
|
css: widthObserverWrapper,
|
|
49
48
|
ref: ref,
|
|
50
49
|
tabIndex: -1
|
|
51
|
-
},
|
|
50
|
+
}, /*#__PURE__*/React.createElement(WidthObserver, {
|
|
52
51
|
setWidth: setContainerWidth
|
|
53
52
|
}));
|
|
54
53
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React, { Fragment } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import { base, keyName } from 'w3c-keyname';
|
|
5
4
|
import { N400 } from '@atlaskit/theme/colors';
|
|
6
5
|
import { editorCommandToPMCommand } from '../preset/editor-commands';
|
|
@@ -119,7 +118,7 @@ export const ToolTipContent = /*#__PURE__*/React.memo(({
|
|
|
119
118
|
keymap
|
|
120
119
|
}) => {
|
|
121
120
|
const shortcut = shortcutOverride || keymap && formatShortcut(keymap);
|
|
122
|
-
return shortcut || description ?
|
|
121
|
+
return shortcut || description ? /*#__PURE__*/React.createElement(Fragment, null, description, shortcut && description && '\u00A0', shortcut && /*#__PURE__*/React.createElement("span", {
|
|
123
122
|
css: tooltipShortcutStyle
|
|
124
123
|
}, shortcut)) : null;
|
|
125
124
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/** @jsx jsx */
|
|
3
|
-
|
|
4
2
|
import React, { PureComponent } from 'react';
|
|
5
|
-
import { css
|
|
3
|
+
import { css } from '@emotion/react';
|
|
6
4
|
import debounce from 'lodash/debounce';
|
|
7
5
|
import { flushSync } from 'react-dom';
|
|
8
6
|
import { defineMessages, injectIntl } from 'react-intl-next';
|
|
@@ -100,7 +98,7 @@ export const messages = defineMessages({
|
|
|
100
98
|
description: 'Visible label for text input in hyperlink floating control'
|
|
101
99
|
}
|
|
102
100
|
});
|
|
103
|
-
const defaultIcon =
|
|
101
|
+
const defaultIcon = /*#__PURE__*/React.createElement(Page16Icon, {
|
|
104
102
|
label: 'page'
|
|
105
103
|
});
|
|
106
104
|
const mapActivityProviderResultToLinkSearchItemData = ({
|
|
@@ -689,27 +687,27 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
689
687
|
// as the Aria design pattern for combobox does not work in this case
|
|
690
688
|
// for details: https://a11y-internal.atlassian.net/browse/AK-740
|
|
691
689
|
const screenReaderText = browser.safari && this.getScreenReaderText();
|
|
692
|
-
return
|
|
690
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
693
691
|
"aria-label": "Hyperlink Edit",
|
|
694
692
|
className: "recent-list"
|
|
695
|
-
},
|
|
693
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
696
694
|
css: [container, !!activityProvider && containerWithProvider, containerPadding],
|
|
697
695
|
ref: this.wrapperRef
|
|
698
|
-
},
|
|
696
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
699
697
|
htmlFor: linkSearchInputId,
|
|
700
698
|
css: inputLabel
|
|
701
|
-
}, formatMessage(messages.linkVisibleLabel)),
|
|
699
|
+
}, formatMessage(messages.linkVisibleLabel)), /*#__PURE__*/React.createElement("div", {
|
|
702
700
|
css: [inputWrapper, inputWrapperPosition]
|
|
703
|
-
}, screenReaderText &&
|
|
701
|
+
}, screenReaderText && /*#__PURE__*/React.createElement(Announcer, {
|
|
704
702
|
ariaLive: "assertive",
|
|
705
703
|
text: screenReaderText,
|
|
706
704
|
ariaRelevant: "additions",
|
|
707
705
|
delay: 250
|
|
708
|
-
}),
|
|
706
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
709
707
|
css: visuallyHiddenStyles,
|
|
710
708
|
"aria-hidden": "true",
|
|
711
709
|
id: screenReaderDescriptionId
|
|
712
|
-
}, formatMessage(messages.searchLinkAriaDescription)),
|
|
710
|
+
}, formatMessage(messages.searchLinkAriaDescription)), /*#__PURE__*/React.createElement(PanelTextInput, {
|
|
713
711
|
role: "combobox",
|
|
714
712
|
ariaExpanded: true,
|
|
715
713
|
ariaActiveDescendant: ariaActiveDescendant,
|
|
@@ -727,23 +725,23 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
727
725
|
defaultValue: displayUrl,
|
|
728
726
|
onKeyDown: this.handleKeyDown,
|
|
729
727
|
inputId: linkSearchInputId
|
|
730
|
-
}), displayUrl &&
|
|
728
|
+
}), displayUrl && /*#__PURE__*/React.createElement("div", {
|
|
731
729
|
css: clearTextWrapper
|
|
732
|
-
},
|
|
730
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
733
731
|
content: formatClearLinkText
|
|
734
|
-
},
|
|
732
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
735
733
|
type: "button",
|
|
736
734
|
css: clearText,
|
|
737
735
|
onClick: this.handleClearText,
|
|
738
736
|
tabIndex: 0
|
|
739
|
-
},
|
|
737
|
+
}, /*#__PURE__*/React.createElement(CrossCircleIcon, {
|
|
740
738
|
label: formatClearLinkText
|
|
741
|
-
}))))),
|
|
739
|
+
}))))), /*#__PURE__*/React.createElement("label", {
|
|
742
740
|
htmlFor: displayTextInputId,
|
|
743
741
|
css: [inputLabel, textLabelMargin]
|
|
744
|
-
}, formatMessage(messages.textVisibleLabel)),
|
|
742
|
+
}, formatMessage(messages.textVisibleLabel)), /*#__PURE__*/React.createElement("div", {
|
|
745
743
|
css: [inputWrapper, inputWrapperPosition]
|
|
746
|
-
},
|
|
744
|
+
}, /*#__PURE__*/React.createElement(PanelTextInput, {
|
|
747
745
|
ref: ele => this.displayTextInputContainer = ele,
|
|
748
746
|
testId: 'link-text',
|
|
749
747
|
onChange: this.updateTextInput,
|
|
@@ -752,25 +750,25 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
|
|
|
752
750
|
onSubmit: this.handleSubmit,
|
|
753
751
|
onKeyDown: this.handleKeyDown,
|
|
754
752
|
inputId: displayTextInputId
|
|
755
|
-
}), displayText &&
|
|
753
|
+
}), displayText && /*#__PURE__*/React.createElement("div", {
|
|
756
754
|
css: clearTextWrapper
|
|
757
|
-
},
|
|
755
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
758
756
|
content: formatMessage(messages.clearText)
|
|
759
|
-
},
|
|
757
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
760
758
|
type: "button",
|
|
761
759
|
css: clearText,
|
|
762
760
|
onClick: this.handleClearDisplayText,
|
|
763
761
|
onKeyDown: this.handleClearTextKeyDown
|
|
764
|
-
},
|
|
762
|
+
}, /*#__PURE__*/React.createElement(CrossCircleIcon, {
|
|
765
763
|
label: formatMessage(messages.clearText)
|
|
766
|
-
}))))),
|
|
764
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
767
765
|
css: visuallyHiddenStyles,
|
|
768
766
|
"aria-live": "polite",
|
|
769
767
|
"aria-atomic": "true",
|
|
770
768
|
id: "fabric.editor.hyperlink.suggested.results"
|
|
771
769
|
}, displayUrl && formatMessage(messages.searchLinkResults, {
|
|
772
770
|
count: items.length
|
|
773
|
-
})),
|
|
771
|
+
})), /*#__PURE__*/React.createElement(LinkSearchList, {
|
|
774
772
|
ariaControls: "fabric.editor.hyperlink.suggested.results",
|
|
775
773
|
id: linkSearchListId,
|
|
776
774
|
role: "listbox",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
|
-
import { css
|
|
2
|
+
import { css } from '@emotion/react';
|
|
4
3
|
import Spinner from '@atlaskit/spinner';
|
|
5
4
|
import { N30 } from '@atlaskit/theme/colors';
|
|
6
5
|
import LinkSearchListItem from './LinkSearchListItem';
|
|
@@ -35,12 +34,12 @@ export default class LinkSearchList extends PureComponent {
|
|
|
35
34
|
let itemsContent;
|
|
36
35
|
let loadingContent;
|
|
37
36
|
if (items && items.length > 0) {
|
|
38
|
-
itemsContent =
|
|
37
|
+
itemsContent = /*#__PURE__*/React.createElement("ul", {
|
|
39
38
|
css: linkSearchList,
|
|
40
39
|
id: id,
|
|
41
40
|
role: role,
|
|
42
41
|
"aria-controls": ariaControls
|
|
43
|
-
}, items.map((item, index) =>
|
|
42
|
+
}, items.map((item, index) => /*#__PURE__*/React.createElement(LinkSearchListItem, {
|
|
44
43
|
id: `link-search-list-item-${index}`,
|
|
45
44
|
role: role && 'option',
|
|
46
45
|
item: item,
|
|
@@ -53,14 +52,14 @@ export default class LinkSearchList extends PureComponent {
|
|
|
53
52
|
})));
|
|
54
53
|
}
|
|
55
54
|
if (isLoading) {
|
|
56
|
-
loadingContent =
|
|
55
|
+
loadingContent = /*#__PURE__*/React.createElement("div", {
|
|
57
56
|
"data-testid": `${id}-loading`,
|
|
58
57
|
css: spinnerContainer
|
|
59
|
-
},
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
60
59
|
size: "medium"
|
|
61
60
|
}));
|
|
62
61
|
}
|
|
63
|
-
return
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
64
63
|
css: listContainer
|
|
65
64
|
}, itemsContent, loadingContent);
|
|
66
65
|
}
|