@atlaskit/link-picker 2.1.0 → 3.0.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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/common/generic-error-svg/index.js +2 -10
- package/dist/cjs/common/ui/empty-state/index.js +2 -10
- package/dist/cjs/common/ui/min-height-container/index.js +2 -14
- package/dist/cjs/ui/error-boundary/error-boundary-fallback/index.js +2 -9
- package/dist/cjs/ui/link-picker/form-footer/index.js +3 -11
- package/dist/cjs/ui/link-picker/index.js +3 -10
- package/dist/cjs/ui/link-picker/search-results/index.js +2 -10
- package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +2 -13
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +2 -10
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/index.js +2 -15
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/index.js +2 -10
- package/dist/cjs/ui/link-picker/search-results/search-results-container/index.js +2 -10
- package/dist/cjs/ui/link-picker/text-input/index.js +2 -9
- package/dist/cjs/ui/loader-fallback/index.js +2 -10
- package/dist/cjs/ui/main.js +3 -11
- package/dist/es2019/common/generic-error-svg/index.js +1 -9
- package/dist/es2019/common/ui/empty-state/index.js +1 -9
- package/dist/es2019/common/ui/min-height-container/index.js +1 -13
- package/dist/es2019/ui/error-boundary/error-boundary-fallback/index.js +1 -8
- package/dist/es2019/ui/link-picker/form-footer/index.js +2 -10
- package/dist/es2019/ui/link-picker/index.js +2 -9
- package/dist/es2019/ui/link-picker/search-results/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +1 -12
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/index.js +1 -14
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/search-results-container/index.js +1 -9
- package/dist/es2019/ui/link-picker/text-input/index.js +1 -8
- package/dist/es2019/ui/loader-fallback/index.js +1 -9
- package/dist/es2019/ui/main.js +2 -10
- package/dist/esm/common/generic-error-svg/index.js +1 -9
- package/dist/esm/common/ui/empty-state/index.js +1 -9
- package/dist/esm/common/ui/min-height-container/index.js +1 -13
- package/dist/esm/ui/error-boundary/error-boundary-fallback/index.js +1 -8
- package/dist/esm/ui/link-picker/form-footer/index.js +2 -10
- package/dist/esm/ui/link-picker/index.js +2 -9
- package/dist/esm/ui/link-picker/search-results/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +1 -12
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/index.js +1 -14
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/search-results-container/index.js +1 -9
- package/dist/esm/ui/link-picker/text-input/index.js +1 -8
- package/dist/esm/ui/loader-fallback/index.js +1 -9
- package/dist/esm/ui/main.js +2 -10
- package/dist/types/common/generic-error-svg/index.d.ts +0 -1
- package/dist/types/common/ui/empty-state/index.d.ts +1 -2
- package/dist/types/common/ui/min-height-container/index.d.ts +0 -3
- package/dist/types/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -1
- package/dist/types/ui/index.d.ts +2 -2
- package/dist/types/ui/lazy.d.ts +1 -1
- package/dist/types/ui/link-picker/form-footer/index.d.ts +1 -2
- package/dist/types/ui/link-picker/index.d.ts +1 -2
- package/dist/types/ui/link-picker/search-results/index.d.ts +1 -2
- package/dist/types/ui/link-picker/search-results/link-search-list/index.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.d.ts +1 -2
- package/dist/types/ui/link-picker/search-results/link-search-list/list-item/index.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/scrolling-tabs/index.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/search-results-container/index.d.ts +1 -2
- package/dist/types/ui/link-picker/text-input/index.d.ts +1 -2
- package/dist/types/ui/loader-fallback/index.d.ts +0 -1
- package/dist/types/ui/main.d.ts +1 -2
- package/dist/types-ts4.5/common/generic-error-svg/index.d.ts +0 -1
- package/dist/types-ts4.5/common/ui/empty-state/index.d.ts +1 -2
- package/dist/types-ts4.5/common/ui/min-height-container/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/lazy.d.ts +1 -1
- package/dist/types-ts4.5/ui/link-picker/form-footer/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/search-results/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/list-item/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/text-input/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/loader-fallback/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/main.d.ts +1 -2
- package/package.json +1 -5
- package/report.api.md +1 -1
- package/dist/cjs/common/generic-error-svg/old/index.js +0 -66
- package/dist/cjs/common/ui/empty-state/old/index.js +0 -38
- package/dist/cjs/common/ui/min-height-container/old/index.js +0 -34
- package/dist/cjs/common/ui/min-height-container/old/styled.js +0 -16
- package/dist/cjs/ui/error-boundary/error-boundary-fallback/old/index.js +0 -50
- package/dist/cjs/ui/link-picker/form-footer/old/index.js +0 -116
- package/dist/cjs/ui/link-picker/old/index.js +0 -435
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.js +0 -70
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/old/index.js +0 -145
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/old/styled.js +0 -91
- package/dist/cjs/ui/link-picker/search-results/link-search-list/old/index.js +0 -188
- package/dist/cjs/ui/link-picker/search-results/link-search-list/old/styled.js +0 -45
- package/dist/cjs/ui/link-picker/search-results/old/index.js +0 -105
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/old/index.js +0 -163
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/old/styles.js +0 -74
- package/dist/cjs/ui/link-picker/search-results/search-results-container/old/index.js +0 -43
- package/dist/cjs/ui/link-picker/text-input/old/index.js +0 -125
- package/dist/cjs/ui/loader-fallback/old/index.js +0 -67
- package/dist/cjs/ui/old/main.js +0 -75
- package/dist/es2019/common/generic-error-svg/old/index.js +0 -58
- package/dist/es2019/common/ui/empty-state/old/index.js +0 -32
- package/dist/es2019/common/ui/min-height-container/old/index.js +0 -25
- package/dist/es2019/common/ui/min-height-container/old/styled.js +0 -10
- package/dist/es2019/ui/error-boundary/error-boundary-fallback/old/index.js +0 -41
- package/dist/es2019/ui/link-picker/form-footer/old/index.js +0 -104
- package/dist/es2019/ui/link-picker/old/index.js +0 -436
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.js +0 -63
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/old/index.js +0 -132
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/old/styled.js +0 -83
- package/dist/es2019/ui/link-picker/search-results/link-search-list/old/index.js +0 -178
- package/dist/es2019/ui/link-picker/search-results/link-search-list/old/styled.js +0 -38
- package/dist/es2019/ui/link-picker/search-results/old/index.js +0 -98
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/old/index.js +0 -130
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/old/styles.js +0 -67
- package/dist/es2019/ui/link-picker/search-results/search-results-container/old/index.js +0 -37
- package/dist/es2019/ui/link-picker/text-input/old/index.js +0 -121
- package/dist/es2019/ui/loader-fallback/old/index.js +0 -60
- package/dist/es2019/ui/old/main.js +0 -73
- package/dist/esm/common/generic-error-svg/old/index.js +0 -58
- package/dist/esm/common/ui/empty-state/old/index.js +0 -31
- package/dist/esm/common/ui/min-height-container/old/index.js +0 -25
- package/dist/esm/common/ui/min-height-container/old/styled.js +0 -10
- package/dist/esm/ui/error-boundary/error-boundary-fallback/old/index.js +0 -43
- package/dist/esm/ui/link-picker/form-footer/old/index.js +0 -108
- package/dist/esm/ui/link-picker/old/index.js +0 -432
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.js +0 -63
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/old/index.js +0 -136
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/old/styled.js +0 -84
- package/dist/esm/ui/link-picker/search-results/link-search-list/old/index.js +0 -186
- package/dist/esm/ui/link-picker/search-results/link-search-list/old/styled.js +0 -38
- package/dist/esm/ui/link-picker/search-results/old/index.js +0 -100
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/old/index.js +0 -158
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/old/styles.js +0 -67
- package/dist/esm/ui/link-picker/search-results/search-results-container/old/index.js +0 -36
- package/dist/esm/ui/link-picker/text-input/old/index.js +0 -121
- package/dist/esm/ui/loader-fallback/old/index.js +0 -59
- package/dist/esm/ui/old/main.js +0 -64
- package/dist/types/common/generic-error-svg/old/index.d.ts +0 -6
- package/dist/types/common/ui/empty-state/old/index.d.ts +0 -9
- package/dist/types/common/ui/min-height-container/old/index.d.ts +0 -8
- package/dist/types/common/ui/min-height-container/old/styled.d.ts +0 -1
- package/dist/types/ui/error-boundary/error-boundary-fallback/old/index.d.ts +0 -6
- package/dist/types/ui/link-picker/form-footer/old/index.d.ts +0 -42
- package/dist/types/ui/link-picker/old/index.d.ts +0 -25
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.d.ts +0 -6
- package/dist/types/ui/link-picker/search-results/link-search-list/list-item/old/index.d.ts +0 -23
- package/dist/types/ui/link-picker/search-results/link-search-list/list-item/old/styled.d.ts +0 -7
- package/dist/types/ui/link-picker/search-results/link-search-list/old/index.d.ts +0 -52
- package/dist/types/ui/link-picker/search-results/link-search-list/old/styled.d.ts +0 -4
- package/dist/types/ui/link-picker/search-results/old/index.d.ts +0 -45
- package/dist/types/ui/link-picker/search-results/scrolling-tabs/old/index.d.ts +0 -7
- package/dist/types/ui/link-picker/search-results/scrolling-tabs/old/styles.d.ts +0 -6
- package/dist/types/ui/link-picker/search-results/search-results-container/old/index.d.ts +0 -10
- package/dist/types/ui/link-picker/text-input/old/index.d.ts +0 -18
- package/dist/types/ui/loader-fallback/old/index.d.ts +0 -17
- package/dist/types/ui/old/main.d.ts +0 -13
- package/dist/types-ts4.5/common/generic-error-svg/old/index.d.ts +0 -6
- package/dist/types-ts4.5/common/ui/empty-state/old/index.d.ts +0 -9
- package/dist/types-ts4.5/common/ui/min-height-container/old/index.d.ts +0 -8
- package/dist/types-ts4.5/common/ui/min-height-container/old/styled.d.ts +0 -1
- package/dist/types-ts4.5/ui/error-boundary/error-boundary-fallback/old/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-picker/form-footer/old/index.d.ts +0 -42
- package/dist/types-ts4.5/ui/link-picker/old/index.d.ts +0 -25
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/list-item/old/index.d.ts +0 -23
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/list-item/old/styled.d.ts +0 -7
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/old/index.d.ts +0 -52
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/old/styled.d.ts +0 -4
- package/dist/types-ts4.5/ui/link-picker/search-results/old/index.d.ts +0 -45
- package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/old/index.d.ts +0 -7
- package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/old/styles.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/old/index.d.ts +0 -10
- package/dist/types-ts4.5/ui/link-picker/text-input/old/index.d.ts +0 -18
- package/dist/types-ts4.5/ui/loader-fallback/old/index.d.ts +0 -17
- package/dist/types-ts4.5/ui/old/main.d.ts +0 -13
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.scrollingContainerStyles = exports.nextButtonStyles = exports.containerStyles = exports.buttonContainerStyles = exports.backButtonStyles = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
-
var scrollingContainerStyles = exports.scrollingContainerStyles = (0, _react.css)({
|
|
13
|
-
overflowX: 'auto',
|
|
14
|
-
scrollBehavior: 'smooth',
|
|
15
|
-
scrollPadding: '0 24px',
|
|
16
|
-
scrollbarWidth: 'none',
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
18
|
-
'&::-webkit-scrollbar': {
|
|
19
|
-
display: 'none'
|
|
20
|
-
},
|
|
21
|
-
'&::before': {
|
|
22
|
-
content: '""',
|
|
23
|
-
borderRadius: 2,
|
|
24
|
-
bottom: 0,
|
|
25
|
-
margin: 0,
|
|
26
|
-
position: 'absolute',
|
|
27
|
-
width: 'inherit',
|
|
28
|
-
left: "var(--ds-space-100, 8px)",
|
|
29
|
-
right: "var(--ds-space-100, 8px)",
|
|
30
|
-
height: 2,
|
|
31
|
-
backgroundColor: "var(--ds-border, ".concat(_colors.N30, ")")
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
|
-
var containerStyles = exports.containerStyles = (0, _react.css)({
|
|
37
|
-
position: 'relative',
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
39
|
-
'[role="tablist"]': {
|
|
40
|
-
'&::before': {
|
|
41
|
-
display: 'none'
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
// Overrides Atlaskit tabs styles to stop overflowing with ellipsis
|
|
45
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
46
|
-
'[role="tab"]': {
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
48
|
-
overflow: 'unset !important',
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
50
|
-
textOverflow: 'unset !important'
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
55
|
-
var buttonContainerStyles = exports.buttonContainerStyles = (0, _react.css)({
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
top: "var(--ds-space-050, 4px)",
|
|
58
|
-
zIndex: 999,
|
|
59
|
-
backgroundColor: "var(--ds-surface, ".concat(_colors.N0, ")")
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-array-arguments, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
63
|
-
var backButtonStyles = exports.backButtonStyles = (0, _react.css)([
|
|
64
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
65
|
-
buttonContainerStyles, {
|
|
66
|
-
left: 0
|
|
67
|
-
}]);
|
|
68
|
-
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-array-arguments, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
70
|
-
var nextButtonStyles = exports.nextButtonStyles = (0, _react.css)([
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
|
-
buttonContainerStyles, {
|
|
73
|
-
right: 0
|
|
74
|
-
}]);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SearchResultsContainerOld = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _react2 = require("@emotion/react");
|
|
9
|
-
var _minHeightContainer = require("../../../../../common/ui/min-height-container");
|
|
10
|
-
/**
|
|
11
|
-
* @jsxRuntime classic
|
|
12
|
-
* @jsx jsx
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
|
|
17
|
-
var flexColumn = (0, _react2.css)({
|
|
18
|
-
display: 'flex',
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
justifyContent: 'flex-start',
|
|
21
|
-
width: '100%'
|
|
22
|
-
});
|
|
23
|
-
var SearchResultsContainerOld = exports.SearchResultsContainerOld = function SearchResultsContainerOld(_ref) {
|
|
24
|
-
var hasTabs = _ref.hasTabs,
|
|
25
|
-
adaptiveHeight = _ref.adaptiveHeight,
|
|
26
|
-
isLoadingResults = _ref.isLoadingResults,
|
|
27
|
-
children = _ref.children;
|
|
28
|
-
var ref = (0, _react.useRef)(null);
|
|
29
|
-
var currentHeight = (0, _react.useRef)(null);
|
|
30
|
-
var fixedMinHeight = hasTabs ? '347px' : '302px';
|
|
31
|
-
var adaptiveMinHeight = isLoadingResults && !!currentHeight.current ? "".concat(currentHeight.current, "px") : 'auto';
|
|
32
|
-
var minheight = adaptiveHeight ? adaptiveMinHeight : fixedMinHeight;
|
|
33
|
-
(0, _react.useLayoutEffect)(function () {
|
|
34
|
-
if (ref.current && adaptiveHeight && !isLoadingResults) {
|
|
35
|
-
currentHeight.current = ref.current.getBoundingClientRect().height;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return (0, _react2.jsx)(_minHeightContainer.MinHeightContainer, {
|
|
39
|
-
ref: ref,
|
|
40
|
-
minHeight: minheight,
|
|
41
|
-
css: flexColumn
|
|
42
|
-
}, children);
|
|
43
|
-
};
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.testIds = exports.TextInputOld = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
|
-
var _form = require("@atlaskit/form");
|
|
13
|
-
var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle--select-clear"));
|
|
14
|
-
var _primitives = require("@atlaskit/primitives");
|
|
15
|
-
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
16
|
-
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
|
-
var _conditionalSpotlightTargetWrapper = require("../conditional-spotlight-target-wrapper");
|
|
18
|
-
var _utils = require("../utils");
|
|
19
|
-
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName"];
|
|
20
|
-
/* eslint-disable @atlassian/tangerine/import/no-parent-imports */
|
|
21
|
-
/**
|
|
22
|
-
* @jsxRuntime classic
|
|
23
|
-
* @jsx jsx
|
|
24
|
-
*/
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
|
-
/**
|
|
27
|
-
* Overidding text input margin top which design system provides as a default spacer
|
|
28
|
-
* but it gets in the way of our layout
|
|
29
|
-
*/
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
|
-
var fieldStyles = (0, _react2.css)({
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
33
|
-
'> div': {
|
|
34
|
-
marginTop: 0
|
|
35
|
-
},
|
|
36
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
|
-
'& + &': {
|
|
38
|
-
marginTop: "var(--ds-space-200, 16px)"
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
var testIds = exports.testIds = {
|
|
42
|
-
urlError: 'link-error',
|
|
43
|
-
clearUrlButton: 'clear-text'
|
|
44
|
-
};
|
|
45
|
-
var clearTextButtonStyles = (0, _primitives.xcss)({
|
|
46
|
-
padding: 'space.0',
|
|
47
|
-
marginRight: 'space.050',
|
|
48
|
-
backgroundColor: 'color.background.neutral.subtle',
|
|
49
|
-
border: 'none',
|
|
50
|
-
verticalAlign: 'middle'
|
|
51
|
-
});
|
|
52
|
-
var TextInputOld = exports.TextInputOld = function TextInputOld(_ref) {
|
|
53
|
-
var name = _ref.name,
|
|
54
|
-
label = _ref.label,
|
|
55
|
-
autoFocus = _ref.autoFocus,
|
|
56
|
-
onRedo = _ref.onRedo,
|
|
57
|
-
onUndo = _ref.onUndo,
|
|
58
|
-
onKeyDown = _ref.onKeyDown,
|
|
59
|
-
onClear = _ref.onClear,
|
|
60
|
-
clearLabel = _ref.clearLabel,
|
|
61
|
-
error = _ref.error,
|
|
62
|
-
spotlightTargetName = _ref.spotlightTargetName,
|
|
63
|
-
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
64
|
-
var inputRef = (0, _react.useRef)(null);
|
|
65
|
-
var handleRef = (0, _react.useCallback)(function (input) {
|
|
66
|
-
if (input) {
|
|
67
|
-
inputRef.current = input;
|
|
68
|
-
if (autoFocus) {
|
|
69
|
-
// Need this to prevent jumping when we render TextInput inside Portal @see ED-2992
|
|
70
|
-
input.focus({
|
|
71
|
-
preventScroll: true
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}, [autoFocus]);
|
|
76
|
-
var handleKeydown = (0, _react.useCallback)(function (e) {
|
|
77
|
-
if (typeof onUndo === 'function' && (0, _utils.isUndoEvent)(e)) {
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
onUndo();
|
|
80
|
-
} else if (typeof onRedo === 'function' && (0, _utils.isRedoEvent)(e)) {
|
|
81
|
-
e.preventDefault();
|
|
82
|
-
onRedo();
|
|
83
|
-
}
|
|
84
|
-
if (onKeyDown) {
|
|
85
|
-
onKeyDown(e);
|
|
86
|
-
}
|
|
87
|
-
}, [onUndo, onRedo, onKeyDown]);
|
|
88
|
-
var handleClear = (0, _react.useCallback)(function (e) {
|
|
89
|
-
var _inputRef$current;
|
|
90
|
-
e.preventDefault();
|
|
91
|
-
e.stopPropagation();
|
|
92
|
-
onClear === null || onClear === void 0 || onClear(name);
|
|
93
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
94
|
-
}, [name, onClear]);
|
|
95
|
-
var clearText = restProps.value !== '' && (0, _react2.jsx)(_tooltip.default, {
|
|
96
|
-
content: clearLabel
|
|
97
|
-
}, (0, _react2.jsx)(_primitives.Pressable, {
|
|
98
|
-
xcss: clearTextButtonStyles,
|
|
99
|
-
onClick: handleClear,
|
|
100
|
-
testId: testIds.clearUrlButton
|
|
101
|
-
}, (0, _react2.jsx)(_crossCircleSelectClear.default, {
|
|
102
|
-
LEGACY_size: "medium",
|
|
103
|
-
label: clearLabel || '',
|
|
104
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
105
|
-
spacing: "spacious"
|
|
106
|
-
})));
|
|
107
|
-
return (0, _react2.jsx)("div", {
|
|
108
|
-
css: fieldStyles
|
|
109
|
-
}, (0, _react2.jsx)(_form.Field, {
|
|
110
|
-
label: label,
|
|
111
|
-
name: name
|
|
112
|
-
}, function (_ref2) {
|
|
113
|
-
var fieldProps = _ref2.fieldProps;
|
|
114
|
-
return (0, _react2.jsx)(_conditionalSpotlightTargetWrapper.ConditionalSpotlightTargetWrapper, {
|
|
115
|
-
spotlightTargetName: spotlightTargetName
|
|
116
|
-
}, (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_textfield.default, (0, _extends2.default)({}, fieldProps, restProps, {
|
|
117
|
-
onKeyDown: handleKeydown,
|
|
118
|
-
ref: handleRef,
|
|
119
|
-
elemAfterInput: clearText,
|
|
120
|
-
isInvalid: !!error
|
|
121
|
-
})), error && (0, _react2.jsx)(_form.ErrorMessage, {
|
|
122
|
-
testId: testIds.urlError
|
|
123
|
-
}, error)));
|
|
124
|
-
}));
|
|
125
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.LoaderFallbackOld = void 0;
|
|
8
|
-
var _react = require("@emotion/react");
|
|
9
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
10
|
-
var _minHeightContainer = require("../../../common/ui/min-height-container");
|
|
11
|
-
/**
|
|
12
|
-
* @jsxRuntime classic
|
|
13
|
-
* @jsx jsx
|
|
14
|
-
*/
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
|
|
17
|
-
var styles = (0, _react.css)({
|
|
18
|
-
alignItems: 'center'
|
|
19
|
-
});
|
|
20
|
-
var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
|
|
21
|
-
var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
|
|
22
|
-
var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITH_DISPLAYTEXT = '505px';
|
|
23
|
-
var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITHOUT_DISPLAYTEXT = '429px';
|
|
24
|
-
var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
|
|
25
|
-
var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
|
|
26
|
-
var getEstimatedMinHeight = function getEstimatedMinHeight(_ref) {
|
|
27
|
-
var hideDisplayText = _ref.hideDisplayText,
|
|
28
|
-
isLoadingPlugins = _ref.isLoadingPlugins,
|
|
29
|
-
plugins = _ref.plugins,
|
|
30
|
-
url = _ref.url;
|
|
31
|
-
/**
|
|
32
|
-
* "Insert mode" (search results shown initially)
|
|
33
|
-
*/
|
|
34
|
-
if (!url) {
|
|
35
|
-
/**
|
|
36
|
-
* With tabs
|
|
37
|
-
*/
|
|
38
|
-
if (plugins && plugins.length > 1 || isLoadingPlugins) {
|
|
39
|
-
return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Without tabs
|
|
44
|
-
*/
|
|
45
|
-
if ((plugins === null || plugins === void 0 ? void 0 : plugins.length) === 1) {
|
|
46
|
-
return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITH_DISPLAYTEXT;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
|
|
54
|
-
* to determine the height to prevent jumps in height when loading
|
|
55
|
-
*/
|
|
56
|
-
var LoaderFallbackOld = exports.LoaderFallbackOld = function LoaderFallbackOld(props) {
|
|
57
|
-
var minHeight = getEstimatedMinHeight(props);
|
|
58
|
-
return (0, _react.jsx)(_minHeightContainer.MinHeightContainer, {
|
|
59
|
-
minHeight: minHeight,
|
|
60
|
-
"data-testid": "link-picker-root-loader-boundary-ui",
|
|
61
|
-
css: styles
|
|
62
|
-
}, (0, _react.jsx)(_spinner.default, {
|
|
63
|
-
testId: "link-picker.component-loading-indicator",
|
|
64
|
-
interactionName: props.name || 'link-picker-loading',
|
|
65
|
-
size: "medium"
|
|
66
|
-
}));
|
|
67
|
-
};
|
package/dist/cjs/ui/old/main.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.testIds = exports.composeLinkPickerOld = exports.PACKAGE_DATA = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
var _reactLooselyLazy = require("react-loosely-lazy");
|
|
14
|
-
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
|
-
var _constants = require("../../common/constants");
|
|
16
|
-
var _sessionProvider = require("../../controllers/session-provider");
|
|
17
|
-
var _errorBoundary = require("../error-boundary");
|
|
18
|
-
var _loaderFallback = require("../loader-fallback");
|
|
19
|
-
var _messagesProvider = require("../messages-provider");
|
|
20
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
/* eslint-disable @atlassian/tangerine/import/no-parent-imports */
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @jsxRuntime classic
|
|
26
|
-
* @jsx jsx
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
-
|
|
31
|
-
var testIds = exports.testIds = {
|
|
32
|
-
linkPickerRoot: 'link-picker-root'
|
|
33
|
-
};
|
|
34
|
-
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
35
|
-
packageName: "@atlaskit/link-picker" || '',
|
|
36
|
-
packageVersion: "2.1.0" || '',
|
|
37
|
-
componentName: _constants.COMPONENT_NAME,
|
|
38
|
-
source: _constants.COMPONENT_NAME
|
|
39
|
-
};
|
|
40
|
-
var DefaultRootComponent = function DefaultRootComponent(_ref) {
|
|
41
|
-
var children = _ref.children;
|
|
42
|
-
return (0, _react2.jsx)("div", {
|
|
43
|
-
"data-testid": testIds.linkPickerRoot
|
|
44
|
-
}, children);
|
|
45
|
-
};
|
|
46
|
-
var fixedWidthContainerStyles = (0, _react2.css)({
|
|
47
|
-
width: 'var(--link-picker-width)'
|
|
48
|
-
});
|
|
49
|
-
var FixedWidthContainer = function FixedWidthContainer(props) {
|
|
50
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
51
|
-
css: fixedWidthContainerStyles
|
|
52
|
-
}, props));
|
|
53
|
-
};
|
|
54
|
-
var composeLinkPickerOld = exports.composeLinkPickerOld = function composeLinkPickerOld(Component) {
|
|
55
|
-
return /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
56
|
-
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom;
|
|
57
|
-
var component = props.component;
|
|
58
|
-
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
59
|
-
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
60
|
-
data: PACKAGE_DATA
|
|
61
|
-
}, (0, _react2.jsx)(_sessionProvider.LinkPickerSessionProvider, null, (0, _react2.jsx)(_messagesProvider.MessagesProvider, null, (0, _react2.jsx)("div", {
|
|
62
|
-
style: (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '--link-picker-width', props.disableWidth ? '100%' : // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
|
-
"".concat(_constants.LINK_PICKER_WIDTH_IN_PX, "px")), '--link-picker-padding-left', (_props$paddingLeft = props.paddingLeft) !== null && _props$paddingLeft !== void 0 ? _props$paddingLeft : "var(--ds-space-200, 16px)"), '--link-picker-padding-right', (_props$paddingRight = props.paddingRight) !== null && _props$paddingRight !== void 0 ? _props$paddingRight : "var(--ds-space-200, 16px)"), '--link-picker-padding-top', (_props$paddingTop = props.paddingTop) !== null && _props$paddingTop !== void 0 ? _props$paddingTop : "var(--ds-space-200, 16px)"), '--link-picker-padding-bottom', (_props$paddingBottom = props.paddingBottom) !== null && _props$paddingBottom !== void 0 ? _props$paddingBottom : "var(--ds-space-200, 16px)")
|
|
64
|
-
}, (0, _react2.jsx)(FixedWidthContainer, null, (0, _react2.jsx)(_errorBoundary.ErrorBoundary, null, (0, _react2.jsx)(_reactLooselyLazy.LazySuspense, {
|
|
65
|
-
fallback: (0, _react2.jsx)(_loaderFallback.LoaderFallback, {
|
|
66
|
-
url: props.url,
|
|
67
|
-
hideDisplayText: props.hideDisplayText,
|
|
68
|
-
isLoadingPlugins: props.isLoadingPlugins,
|
|
69
|
-
plugins: props.plugins
|
|
70
|
-
})
|
|
71
|
-
}, (0, _react2.jsx)(RootComponent, (0, _extends2.default)({}, props, {
|
|
72
|
-
"data-testid": testIds.linkPickerRoot
|
|
73
|
-
}), (0, _react2.jsx)(Component, props)))))))));
|
|
74
|
-
});
|
|
75
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
8
|
-
const HEIGHT = 90;
|
|
9
|
-
const genericErrorStyles = css({
|
|
10
|
-
height: `${HEIGHT}px`,
|
|
11
|
-
display: 'block'
|
|
12
|
-
});
|
|
13
|
-
export const GenericErrorSVGOld = props => {
|
|
14
|
-
const id = 'link-picker-ui-generic-error-svg';
|
|
15
|
-
return jsx("svg", _extends({
|
|
16
|
-
height: "90",
|
|
17
|
-
viewBox: "0 0 164 212",
|
|
18
|
-
fill: "none",
|
|
19
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
-
css: genericErrorStyles
|
|
21
|
-
}, props), jsx("path", {
|
|
22
|
-
d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
|
|
23
|
-
fill: `url(#${id})`
|
|
24
|
-
}), jsx("path", {
|
|
25
|
-
opacity: ".6",
|
|
26
|
-
d: "M93.35 27.17 85.94.45c-.17-.62-1.07-.58-1.19.05l-4.66 25.1-5.8-1.08a.612.612 0 0 0-.7.76L81 52c.17.62 1.07.58 1.19-.05l4.66-25.1 5.8 1.08c.45.08.82-.33.7-.76ZM66.77 41.81 55.9 33.26c-.22-.18-.53.07-.41.33l5.53 11.43-2.66 1.29c-.18.09-.2.33-.05.45l10.87 8.55c.22.18.53-.07.41-.33l-5.53-11.43 2.66-1.29c.17-.08.2-.33.05-.45Z",
|
|
27
|
-
fill: "#C1C7D0"
|
|
28
|
-
}), jsx("path", {
|
|
29
|
-
opacity: ".6",
|
|
30
|
-
d: "M102.78 56.75a.993.993 0 0 1-.92-1.38c-.24-.77-2.29-2.85-3.54-4.11-2.97-3.01-4.93-5-3.84-6.49 1.09-1.48 3.58-.22 7.35 1.7 1.32.67 3.35 1.7 4.45 2.03-.64-.95-2.24-2.58-3.28-3.63-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.58-.22 7.34 1.7 1.32.67 3.34 1.7 4.45 2.03-.64-.95-2.24-2.57-3.28-3.62-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.57-.22 7.34 1.7 1.58.8 4.18 2.13 4.98 2.13a1.005 1.005 0 0 1 1.46 1.36c-1.09 1.48-3.57.22-7.34-1.7-1.32-.67-3.34-1.7-4.44-2.03.64.95 2.24 2.57 3.28 3.62 2.97 3.01 4.93 5 3.84 6.49-1.08 1.48-3.57.22-7.34-1.7-1.32-.67-3.35-1.7-4.45-2.03.64.95 2.24 2.57 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-1.09 1.48-3.58.22-7.35-1.7-1.32-.67-3.35-1.71-4.45-2.03.64.95 2.24 2.58 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-.21.26-.51.4-.82.4Zm5.56 14.32c-.35 0-.69-.19-.88-.52-1.04-1.88-2.22-4.02-.91-5.21 1.31-1.2 3.34.18 5.49 1.63.87.59 2.26 1.53 2.93 1.71-.12-.68-.93-2.15-1.45-3.07-1.26-2.27-2.45-4.41-1.14-5.61 1.31-1.2 3.34.18 5.49 1.63.96.65 2.54 1.72 3.1 1.74a1 1 0 0 1 1.27 1.54c-1.31 1.2-3.34-.17-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.15 1.45 3.07 1.26 2.27 2.45 4.41 1.14 5.61-1.31 1.2-3.34-.18-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.14 1.22 2.67.27.48.09 1.09-.39 1.36-.15.09-.32.13-.48.13Zm-54.32-2.89c-.22 0-.44-.04-.67-.14-1.64-.69-1.24-3.11-.81-5.67.17-1.04.45-2.7.33-3.38-.57.39-1.56 1.75-2.18 2.6-1.53 2.09-2.99 4.07-4.62 3.38a.991.991 0 0 1-.53-1.31c.2-.48.73-.72 1.21-.57.52-.21 1.65-1.75 2.34-2.68 1.53-2.09 2.98-4.08 4.62-3.38 1.64.69 1.24 3.11.81 5.67-.17 1.04-.45 2.7-.33 3.38.57-.39 1.56-1.75 2.18-2.6 1.53-2.09 2.98-4.08 4.62-3.38 1.63.69 1.24 3.09.89 5.21-.09.54-.6.91-1.15.83-.54-.09-.92-.6-.83-1.15.1-.59.37-2.24.26-2.92-.57.39-1.56 1.75-2.18 2.6-1.33 1.79-2.59 3.51-3.96 3.51Z",
|
|
31
|
-
fill: "#B3BAC5"
|
|
32
|
-
}), jsx("defs", null, jsx("linearGradient", {
|
|
33
|
-
id: id,
|
|
34
|
-
x1: "26.169",
|
|
35
|
-
y1: "228.621",
|
|
36
|
-
x2: "138.408",
|
|
37
|
-
y2: "116.382",
|
|
38
|
-
gradientUnits: "userSpaceOnUse"
|
|
39
|
-
}, jsx("stop", {
|
|
40
|
-
stopColor: "#C1C7D0"
|
|
41
|
-
}), jsx("stop", {
|
|
42
|
-
offset: ".297",
|
|
43
|
-
stopColor: "#C6CBD4",
|
|
44
|
-
stopOpacity: ".881"
|
|
45
|
-
}), jsx("stop", {
|
|
46
|
-
offset: ".63",
|
|
47
|
-
stopColor: "#D3D7DE",
|
|
48
|
-
stopOpacity: ".748"
|
|
49
|
-
}), jsx("stop", {
|
|
50
|
-
offset: ".98",
|
|
51
|
-
stopColor: "#E9EBEF",
|
|
52
|
-
stopOpacity: ".608"
|
|
53
|
-
}), jsx("stop", {
|
|
54
|
-
offset: "1",
|
|
55
|
-
stopColor: "#EBECF0",
|
|
56
|
-
stopOpacity: ".6"
|
|
57
|
-
}))));
|
|
58
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Heading from '@atlaskit/heading';
|
|
3
|
-
import { Flex, Text, xcss } from '@atlaskit/primitives';
|
|
4
|
-
const containerStyles = xcss({
|
|
5
|
-
marginBlockStart: 'space.600',
|
|
6
|
-
marginBlockEnd: 'space.600',
|
|
7
|
-
textAlign: 'center'
|
|
8
|
-
});
|
|
9
|
-
export const EmptyStateOld = ({
|
|
10
|
-
testId,
|
|
11
|
-
header,
|
|
12
|
-
description,
|
|
13
|
-
renderImage
|
|
14
|
-
}) => {
|
|
15
|
-
return /*#__PURE__*/React.createElement(Flex, {
|
|
16
|
-
xcss: containerStyles,
|
|
17
|
-
testId: testId,
|
|
18
|
-
direction: "column",
|
|
19
|
-
alignItems: "center",
|
|
20
|
-
gap: "space.300"
|
|
21
|
-
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Flex, {
|
|
22
|
-
direction: "column",
|
|
23
|
-
alignItems: "center",
|
|
24
|
-
gap: "space.200"
|
|
25
|
-
}, /*#__PURE__*/React.createElement(Heading, {
|
|
26
|
-
size: "medium",
|
|
27
|
-
as: "h2"
|
|
28
|
-
}, header), description && /*#__PURE__*/React.createElement(Text, {
|
|
29
|
-
as: "p",
|
|
30
|
-
color: "color.text"
|
|
31
|
-
}, description)));
|
|
32
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import React, { forwardRef } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
|
-
import { minHeightComponentStyles } from './styled';
|
|
11
|
-
export const MinHeightContainerOld = /*#__PURE__*/forwardRef(({
|
|
12
|
-
minHeight,
|
|
13
|
-
...props
|
|
14
|
-
}, ref) => {
|
|
15
|
-
return jsx("div", _extends({
|
|
16
|
-
ref: ref
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
18
|
-
,
|
|
19
|
-
css: minHeightComponentStyles
|
|
20
|
-
}, props, {
|
|
21
|
-
style: {
|
|
22
|
-
['--link-picker-min-height']: minHeight
|
|
23
|
-
}
|
|
24
|
-
}));
|
|
25
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
|
-
export const minHeightComponentStyles = css({
|
|
6
|
-
display: 'flex',
|
|
7
|
-
alignItems: 'stretch',
|
|
8
|
-
justifyContent: 'center',
|
|
9
|
-
minHeight: 'var(--link-picker-min-height)'
|
|
10
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import { defineMessages, useIntl } from 'react-intl-next';
|
|
8
|
-
import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../../common/constants';
|
|
9
|
-
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
10
|
-
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
11
|
-
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
12
|
-
const errorBoundaryFallbackStyles = css({
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
14
|
-
lineHeight: 'initial'
|
|
15
|
-
});
|
|
16
|
-
const messages = defineMessages({
|
|
17
|
-
heading: {
|
|
18
|
-
defaultMessage: 'Something went wrong!',
|
|
19
|
-
description: 'Heading displayed when an unhandled error occurs.',
|
|
20
|
-
id: 'fabric.linkPicker.unhandledError.heading'
|
|
21
|
-
},
|
|
22
|
-
description: {
|
|
23
|
-
defaultMessage: 'Try reloading the page.',
|
|
24
|
-
description: 'Body message shown underneath the heading when an unhandled error occurs.',
|
|
25
|
-
id: 'fabric.linkPicker.unhandledError.description'
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export const ErrorBoundaryFallbackOld = () => {
|
|
29
|
-
const intl = useIntl();
|
|
30
|
-
const header = intl.formatMessage(messages.heading);
|
|
31
|
-
const description = intl.formatMessage(messages.description);
|
|
32
|
-
return jsx(MinHeightContainer, {
|
|
33
|
-
css: errorBoundaryFallbackStyles,
|
|
34
|
-
minHeight: LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK,
|
|
35
|
-
"data-testid": "link-picker-root-error-boundary-ui"
|
|
36
|
-
}, jsx(EmptyState, {
|
|
37
|
-
header: header,
|
|
38
|
-
renderImage: () => jsx(GenericErrorSVG, null),
|
|
39
|
-
description: description
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/* eslint-disable @atlassian/tangerine/import/no-parent-imports */
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @jsxRuntime classic
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
8
|
-
import { memo } from 'react';
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
|
-
import { css, jsx } from '@emotion/react';
|
|
12
|
-
import { defineMessages, useIntl } from 'react-intl-next';
|
|
13
|
-
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
14
|
-
import EditorAddIconLegacy from '@atlaskit/icon/glyph/editor/add';
|
|
15
|
-
import EditorAddIcon from '@atlaskit/icon/utility/add';
|
|
16
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
17
|
-
import { UnauthenticatedError } from '../../../../common/utils/errors';
|
|
18
|
-
import { LinkPickerSubmitButton } from '../link-picker-submit-button';
|
|
19
|
-
const formFooterStyles = css({
|
|
20
|
-
display: 'flex',
|
|
21
|
-
justifyContent: 'flex-end'
|
|
22
|
-
});
|
|
23
|
-
const formFooterActionStyles = css({
|
|
24
|
-
marginRight: 'auto'
|
|
25
|
-
});
|
|
26
|
-
export const messages = defineMessages({
|
|
27
|
-
cancelButton: {
|
|
28
|
-
id: 'fabric.linkPicker.button.cancel',
|
|
29
|
-
defaultMessage: 'Cancel',
|
|
30
|
-
description: 'Button to cancel and dismiss the link picker'
|
|
31
|
-
},
|
|
32
|
-
submittingStatusMessage: {
|
|
33
|
-
id: 'fabric.linkPicker.status.submitting',
|
|
34
|
-
defaultMessage: 'Submitting',
|
|
35
|
-
description: 'Accessibility text to indicate the form has been submitted, and submission is in-progress'
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
export const testIds = {
|
|
39
|
-
insertButton: 'link-picker-insert-button',
|
|
40
|
-
cancelButton: 'link-picker-cancel-button',
|
|
41
|
-
actionButton: 'link-picker-action-button',
|
|
42
|
-
submitStatusA11yIndicator: 'link-picker-submit-status-a11y-indicator',
|
|
43
|
-
/** Feature discovery for action button (css pulse) */
|
|
44
|
-
actionButtonDiscovery: 'link-picker-action-button-discovery'
|
|
45
|
-
};
|
|
46
|
-
export const FormFooterOld = /*#__PURE__*/memo(({
|
|
47
|
-
isLoading,
|
|
48
|
-
isSubmitting = false,
|
|
49
|
-
error,
|
|
50
|
-
url,
|
|
51
|
-
queryState,
|
|
52
|
-
items,
|
|
53
|
-
isEditing,
|
|
54
|
-
onCancel,
|
|
55
|
-
action,
|
|
56
|
-
customSubmitButtonLabel,
|
|
57
|
-
submitMessageId,
|
|
58
|
-
hideSubmitButton,
|
|
59
|
-
...restProps
|
|
60
|
-
}) => {
|
|
61
|
-
const intl = useIntl();
|
|
62
|
-
if (error && error instanceof UnauthenticatedError) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
const createButton = pluginAction => jsx(Button, {
|
|
66
|
-
testId: testIds.actionButton,
|
|
67
|
-
onClick: pluginAction.callback,
|
|
68
|
-
appearance: "default",
|
|
69
|
-
iconBefore: jsx(EditorAddIcon, {
|
|
70
|
-
label: "",
|
|
71
|
-
LEGACY_size: "medium",
|
|
72
|
-
LEGACY_fallbackIcon: EditorAddIconLegacy,
|
|
73
|
-
color: "currentColor"
|
|
74
|
-
}),
|
|
75
|
-
isDisabled: isSubmitting,
|
|
76
|
-
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
77
|
-
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label));
|
|
78
|
-
return jsx("footer", _extends({
|
|
79
|
-
css: formFooterStyles
|
|
80
|
-
}, restProps), isSubmitting && jsx(VisuallyHidden, {
|
|
81
|
-
role: "status",
|
|
82
|
-
id: submitMessageId,
|
|
83
|
-
testId: testIds.submitStatusA11yIndicator
|
|
84
|
-
}, intl.formatMessage(messages.submittingStatusMessage)), action && jsx("div", {
|
|
85
|
-
css: formFooterActionStyles
|
|
86
|
-
}, createButton(action)), jsx(ButtonGroup, null, onCancel && jsx(Button, {
|
|
87
|
-
appearance: "subtle",
|
|
88
|
-
onClick: onCancel,
|
|
89
|
-
testId: testIds.cancelButton,
|
|
90
|
-
isDisabled: isSubmitting,
|
|
91
|
-
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
92
|
-
}, intl.formatMessage(messages.cancelButton)), !hideSubmitButton && jsx(LinkPickerSubmitButton, {
|
|
93
|
-
isEditing: isEditing,
|
|
94
|
-
isLoading: isLoading,
|
|
95
|
-
isSubmitting: isSubmitting,
|
|
96
|
-
customSubmitButtonLabel: customSubmitButtonLabel,
|
|
97
|
-
error: error,
|
|
98
|
-
items: items,
|
|
99
|
-
queryState: queryState,
|
|
100
|
-
submitMessageId: submitMessageId,
|
|
101
|
-
testId: testIds.insertButton,
|
|
102
|
-
url: url
|
|
103
|
-
})));
|
|
104
|
-
});
|