@atlaskit/link-picker 1.5.0 → 1.5.1
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 +6 -0
- package/dist/cjs/ui/link-picker/index.js +15 -13
- package/dist/cjs/ui/link-picker/styled.js +5 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/ui/link-picker/index.js +11 -9
- package/dist/es2019/ui/link-picker/styled.js +4 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/ui/link-picker/index.js +11 -9
- package/dist/esm/ui/link-picker/styled.js +3 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/ui/link-picker/styled.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,16 @@ var _react2 = require("@emotion/react");
|
|
|
21
21
|
|
|
22
22
|
var _reactIntlNext = require("react-intl-next");
|
|
23
23
|
|
|
24
|
+
var _button = _interopRequireWildcard(require("@atlaskit/button"));
|
|
25
|
+
|
|
26
|
+
var _form = require("@atlaskit/form");
|
|
27
|
+
|
|
28
|
+
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
29
|
+
|
|
30
|
+
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
31
|
+
|
|
32
|
+
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
33
|
+
|
|
24
34
|
var _messages = require("./messages");
|
|
25
35
|
|
|
26
36
|
var _textInput = _interopRequireDefault(require("./text-input"));
|
|
@@ -35,17 +45,7 @@ var _browser = require("./browser");
|
|
|
35
45
|
|
|
36
46
|
var _transformTimeStamp = require("./transformTimeStamp");
|
|
37
47
|
|
|
38
|
-
var _announcer = _interopRequireDefault(require("
|
|
39
|
-
|
|
40
|
-
var _button = _interopRequireWildcard(require("@atlaskit/button"));
|
|
41
|
-
|
|
42
|
-
var _form = require("@atlaskit/form");
|
|
43
|
-
|
|
44
|
-
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
45
|
-
|
|
46
|
-
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
47
|
-
|
|
48
|
-
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
48
|
+
var _announcer = _interopRequireDefault(require("./announcer"));
|
|
49
49
|
|
|
50
50
|
var _linkSearchNoResults = _interopRequireDefault(require("./link-search-no-results"));
|
|
51
51
|
|
|
@@ -297,7 +297,9 @@ function LinkPicker(_ref) {
|
|
|
297
297
|
onSubmit: handleSubmit,
|
|
298
298
|
onKeyDown: handleKeyDown,
|
|
299
299
|
onChange: handleChangeText
|
|
300
|
-
}), tabs.length > 0 && (0, _react2.jsx)(
|
|
300
|
+
}), tabs.length > 0 && (0, _react2.jsx)("div", {
|
|
301
|
+
css: _styled.tabsWrapperStyles
|
|
302
|
+
}, (0, _react2.jsx)(_tabs.default, {
|
|
301
303
|
id: testIds.tabList,
|
|
302
304
|
testId: testIds.tabList,
|
|
303
305
|
onChange: function onChange(activeTab) {
|
|
@@ -313,7 +315,7 @@ function LinkPicker(_ref) {
|
|
|
313
315
|
key: tab.tabTitle,
|
|
314
316
|
testId: testIds.tabItem
|
|
315
317
|
}, tab.tabTitle);
|
|
316
|
-
}))), !!items.length && (0, _react2.jsx)("div", {
|
|
318
|
+
})))), !!items.length && (0, _react2.jsx)("div", {
|
|
317
319
|
css: _styled.listTitleStyles,
|
|
318
320
|
id: testIds.resultListTitle,
|
|
319
321
|
"data-testid": testIds.resultListTitle
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.searchIconStyles = exports.rootContainerStylesForLoader = exports.rootContainerStyles = exports.listTitleStyles = void 0;
|
|
8
|
+
exports.tabsWrapperStyles = exports.searchIconStyles = exports.rootContainerStylesForLoader = exports.rootContainerStyles = exports.listTitleStyles = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -19,7 +19,7 @@ var _theme = require("@atlaskit/theme");
|
|
|
19
19
|
|
|
20
20
|
var _constants = require("@atlaskit/theme/constants");
|
|
21
21
|
|
|
22
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
22
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
23
23
|
|
|
24
24
|
var LINK_PICKER_WIDTH_IN_PX = 342;
|
|
25
25
|
var LINK_PICKER_MIN_HEIGHT_IN_PX = 234;
|
|
@@ -30,4 +30,6 @@ exports.rootContainerStylesForLoader = rootContainerStylesForLoader;
|
|
|
30
30
|
var searchIconStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", "px;\n color: ", ";\n cursor: default;\n"])), (0, _constants.gridSize)() / 2, (0, _tokens.token)('color.icon', _colors.N500));
|
|
31
31
|
exports.searchIconStyles = searchIconStyles;
|
|
32
32
|
var listTitleStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), _theme.typography.h100(), (0, _constants.gridSize)() / 2);
|
|
33
|
-
exports.listTitleStyles = listTitleStyles;
|
|
33
|
+
exports.listTitleStyles = listTitleStyles;
|
|
34
|
+
var tabsWrapperStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: -", "px;\n margin-right: -", "px;\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)());
|
|
35
|
+
exports.tabsWrapperStyles = tabsWrapperStyles;
|
package/dist/cjs/version.json
CHANGED
|
@@ -4,19 +4,19 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import { useCallback, useReducer } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
7
|
+
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
8
|
+
import { FormFooter } from '@atlaskit/form';
|
|
9
|
+
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
10
|
+
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
11
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
7
12
|
import { messages } from './messages';
|
|
8
13
|
import PanelTextInput from './text-input';
|
|
9
14
|
import LinkSearchList from './link-search-list';
|
|
10
15
|
import { normalizeUrl, isSafeUrl } from './url';
|
|
11
|
-
import { rootContainerStyles, searchIconStyles, listTitleStyles } from './styled';
|
|
16
|
+
import { rootContainerStyles, searchIconStyles, listTitleStyles, tabsWrapperStyles } from './styled';
|
|
12
17
|
import { browser } from './browser';
|
|
13
18
|
import { transformTimeStamp } from './transformTimeStamp';
|
|
14
|
-
import Announcer from '
|
|
15
|
-
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
16
|
-
import { FormFooter } from '@atlaskit/form';
|
|
17
|
-
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
18
|
-
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
19
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
19
|
+
import Announcer from './announcer';
|
|
20
20
|
import LinkSearchNoResults from './link-search-no-results';
|
|
21
21
|
import { usePlugins } from '../../services/use-plugins';
|
|
22
22
|
export const RECENT_SEARCH_LIST_SIZE = 5;
|
|
@@ -256,7 +256,9 @@ function LinkPicker({
|
|
|
256
256
|
onSubmit: handleSubmit,
|
|
257
257
|
onKeyDown: handleKeyDown,
|
|
258
258
|
onChange: handleChangeText
|
|
259
|
-
}), tabs.length > 0 && jsx(
|
|
259
|
+
}), tabs.length > 0 && jsx("div", {
|
|
260
|
+
css: tabsWrapperStyles
|
|
261
|
+
}, jsx(Tabs, {
|
|
260
262
|
id: testIds.tabList,
|
|
261
263
|
testId: testIds.tabList,
|
|
262
264
|
onChange: activeTab => dispatch({
|
|
@@ -268,7 +270,7 @@ function LinkPicker({
|
|
|
268
270
|
}, jsx(TabList, null, tabs.map(tab => jsx(Tab, {
|
|
269
271
|
key: tab.tabTitle,
|
|
270
272
|
testId: testIds.tabItem
|
|
271
|
-
}, tab.tabTitle)))), !!items.length && jsx("div", {
|
|
273
|
+
}, tab.tabTitle))))), !!items.length && jsx("div", {
|
|
272
274
|
css: listTitleStyles,
|
|
273
275
|
id: testIds.resultListTitle,
|
|
274
276
|
"data-testid": testIds.resultListTitle
|
package/dist/es2019/version.json
CHANGED
|
@@ -10,19 +10,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
10
10
|
import { useCallback, useReducer } from 'react';
|
|
11
11
|
import { jsx } from '@emotion/react';
|
|
12
12
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
13
|
+
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
14
|
+
import { FormFooter } from '@atlaskit/form';
|
|
15
|
+
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
16
|
+
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
17
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
13
18
|
import { messages } from './messages';
|
|
14
19
|
import PanelTextInput from './text-input';
|
|
15
20
|
import LinkSearchList from './link-search-list';
|
|
16
21
|
import { normalizeUrl, isSafeUrl } from './url';
|
|
17
|
-
import { rootContainerStyles, searchIconStyles, listTitleStyles } from './styled';
|
|
22
|
+
import { rootContainerStyles, searchIconStyles, listTitleStyles, tabsWrapperStyles } from './styled';
|
|
18
23
|
import { browser } from './browser';
|
|
19
24
|
import { transformTimeStamp } from './transformTimeStamp';
|
|
20
|
-
import Announcer from '
|
|
21
|
-
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
22
|
-
import { FormFooter } from '@atlaskit/form';
|
|
23
|
-
import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
24
|
-
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
25
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
25
|
+
import Announcer from './announcer';
|
|
26
26
|
import LinkSearchNoResults from './link-search-no-results';
|
|
27
27
|
import { usePlugins } from '../../services/use-plugins';
|
|
28
28
|
export var RECENT_SEARCH_LIST_SIZE = 5;
|
|
@@ -261,7 +261,9 @@ function LinkPicker(_ref) {
|
|
|
261
261
|
onSubmit: handleSubmit,
|
|
262
262
|
onKeyDown: handleKeyDown,
|
|
263
263
|
onChange: handleChangeText
|
|
264
|
-
}), tabs.length > 0 && jsx(
|
|
264
|
+
}), tabs.length > 0 && jsx("div", {
|
|
265
|
+
css: tabsWrapperStyles
|
|
266
|
+
}, jsx(Tabs, {
|
|
265
267
|
id: testIds.tabList,
|
|
266
268
|
testId: testIds.tabList,
|
|
267
269
|
onChange: function onChange(activeTab) {
|
|
@@ -277,7 +279,7 @@ function LinkPicker(_ref) {
|
|
|
277
279
|
key: tab.tabTitle,
|
|
278
280
|
testId: testIds.tabItem
|
|
279
281
|
}, tab.tabTitle);
|
|
280
|
-
}))), !!items.length && jsx("div", {
|
|
282
|
+
})))), !!items.length && jsx("div", {
|
|
281
283
|
css: listTitleStyles,
|
|
282
284
|
id: testIds.resultListTitle,
|
|
283
285
|
"data-testid": testIds.resultListTitle
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
4
|
|
|
5
5
|
import { token } from '@atlaskit/tokens';
|
|
6
6
|
import { css } from '@emotion/react';
|
|
@@ -14,4 +14,5 @@ var LINK_PICKER_MIN_HEIGHT_IN_PX = 234;
|
|
|
14
14
|
export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n line-height: initial;\n min-height: ", "px;\n"])), LINK_PICKER_WIDTH_IN_PX, gridSize() * 2, LINK_PICKER_MIN_HEIGHT_IN_PX);
|
|
15
15
|
export var rootContainerStylesForLoader = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n display: flex;\n align-items: center;\n justify-content: center;\n"])), rootContainerStyles);
|
|
16
16
|
export var searchIconStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n color: ", ";\n cursor: default;\n"])), gridSize() / 2, token('color.icon', N500));
|
|
17
|
-
export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), typography.h100(), gridSize() / 2);
|
|
17
|
+
export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-bottom: ", "px;\n"])), typography.h100(), gridSize() / 2);
|
|
18
|
+
export var tabsWrapperStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -", "px;\n margin-right: -", "px;\n"])), gridSize(), gridSize());
|
package/dist/esm/version.json
CHANGED
|
@@ -2,3 +2,4 @@ export declare const rootContainerStyles: import("@emotion/react").SerializedSty
|
|
|
2
2
|
export declare const rootContainerStylesForLoader: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const searchIconStyles: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const listTitleStyles: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const tabsWrapperStyles: import("@emotion/react").SerializedStyles;
|