@atlaskit/select 18.8.2 → 18.9.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 +18 -0
- package/codemods/18.3.0-select-props.tsx +0 -1
- package/codemods/__tests__/next-select-props.tsx +0 -7
- package/dist/cjs/CountrySelect.js +1 -0
- package/dist/cjs/PopupSelect/components.js +0 -4
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/createSelect.js +5 -36
- package/dist/es2019/CountrySelect.js +1 -0
- package/dist/es2019/PopupSelect/components.js +0 -2
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/createSelect.js +5 -35
- package/dist/esm/CountrySelect.js +1 -0
- package/dist/esm/PopupSelect/components.js +0 -4
- package/dist/esm/Select.js +1 -1
- package/dist/esm/createSelect.js +6 -37
- package/dist/types/PopupSelect/PopupSelect.d.ts +0 -1
- package/dist/types/PopupSelect/components.d.ts +1 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/PopupSelect/PopupSelect.d.ts +0 -1
- package/dist/types-ts4.5/PopupSelect/components.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/package.json +5 -5
- package/dist/cjs/components/index.js +0 -96
- package/dist/cjs/components/indicators.js +0 -82
- package/dist/cjs/components/input-aria-describedby.js +0 -23
- package/dist/cjs/components/no-options.js +0 -18
- package/dist/es2019/components/index.js +0 -71
- package/dist/es2019/components/indicators.js +0 -68
- package/dist/es2019/components/input-aria-describedby.js +0 -16
- package/dist/es2019/components/no-options.js +0 -11
- package/dist/esm/components/index.js +0 -69
- package/dist/esm/components/indicators.js +0 -75
- package/dist/esm/components/input-aria-describedby.js +0 -16
- package/dist/esm/components/no-options.js +0 -11
- package/dist/types/components/index.d.ts +0 -15
- package/dist/types/components/indicators.d.ts +0 -9
- package/dist/types/components/input-aria-describedby.d.ts +0 -4
- package/dist/types/components/no-options.d.ts +0 -6
- package/dist/types-ts4.5/components/index.d.ts +0 -15
- package/dist/types-ts4.5/components/indicators.d.ts +0 -9
- package/dist/types-ts4.5/components/input-aria-describedby.d.ts +0 -4
- package/dist/types-ts4.5/components/no-options.d.ts +0 -6
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "ClearIndicator", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _indicators.ClearIndicator;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "DropdownIndicator", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _indicators.DropdownIndicator;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
exports.IndicatorSeparator = void 0;
|
|
20
|
-
Object.defineProperty(exports, "LoadingIndicator", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _indicators.LoadingIndicator;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
exports.MultiValueRemove = void 0;
|
|
27
|
-
var _react = require("@emotion/react");
|
|
28
|
-
var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
|
|
29
|
-
var _cross = _interopRequireDefault(require("@atlaskit/icon/utility/cross"));
|
|
30
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
31
|
-
var _primitives = require("@atlaskit/primitives");
|
|
32
|
-
var _reactSelect = require("@atlaskit/react-select");
|
|
33
|
-
var _indicators = require("./indicators");
|
|
34
|
-
/**
|
|
35
|
-
* @jsxRuntime classic
|
|
36
|
-
* @jsx jsx
|
|
37
|
-
*/
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
39
|
-
|
|
40
|
-
var disabledStyles = (0, _react.css)({
|
|
41
|
-
display: 'none'
|
|
42
|
-
});
|
|
43
|
-
var enabledStyles = (0, _react.css)({
|
|
44
|
-
display: 'inherit'
|
|
45
|
-
});
|
|
46
|
-
var iconWrapperStyles = (0, _primitives.xcss)({
|
|
47
|
-
padding: 'space.025'
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* __Multi value remove__
|
|
52
|
-
*
|
|
53
|
-
* The icon used to remove individual selections from a multi-select.
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
var MultiValueRemove = exports.MultiValueRemove = function MultiValueRemove(props) {
|
|
57
|
-
var isDisabled = props.selectProps.isDisabled;
|
|
58
|
-
var renderIcon = function renderIcon() {
|
|
59
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
60
|
-
if ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh')) {
|
|
61
|
-
return (0, _react.jsx)(_cross.default, {
|
|
62
|
-
label: "Clear",
|
|
63
|
-
color: "currentColor"
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
68
|
-
if ((0, _platformFeatureFlags.fg)('platform-visual-refresh-icons-legacy-facade')) {
|
|
69
|
-
return (0, _react.jsx)(_primitives.Inline, {
|
|
70
|
-
xcss: iconWrapperStyles
|
|
71
|
-
}, (0, _react.jsx)(_cross.default, {
|
|
72
|
-
label: "Clear",
|
|
73
|
-
color: "currentColor"
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
76
|
-
return (
|
|
77
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
78
|
-
(0, _react.jsx)(_selectClear.default, {
|
|
79
|
-
label: "Clear",
|
|
80
|
-
primaryColor: "transparent",
|
|
81
|
-
size: "small",
|
|
82
|
-
secondaryColor: "inherit"
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
return (
|
|
87
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
88
|
-
(0, _react.jsx)(_reactSelect.components.MultiValueRemove, props, (0, _react.jsx)("div", {
|
|
89
|
-
css: isDisabled ? disabledStyles : enabledStyles,
|
|
90
|
-
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
|
|
91
|
-
}, renderIcon()))
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
96
|
-
var IndicatorSeparator = exports.IndicatorSeparator = null;
|
|
@@ -1,82 +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.LoadingIndicator = exports.DropdownIndicator = exports.ClearIndicator = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react = require("@emotion/react");
|
|
12
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
13
|
-
var _crossCircleSelectClear = _interopRequireDefault(require("@atlaskit/icon/utility/migration/cross-circle--select-clear"));
|
|
14
|
-
var _primitives = require("@atlaskit/primitives");
|
|
15
|
-
var _reactSelect = require("@atlaskit/react-select");
|
|
16
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
17
|
-
var _excluded = ["clearControlLabel"];
|
|
18
|
-
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
19
|
-
/**
|
|
20
|
-
* @jsxRuntime classic
|
|
21
|
-
* @jsx jsx
|
|
22
|
-
*/
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
24
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
-
var iconContainerStyles = (0, _primitives.xcss)({
|
|
27
|
-
all: 'unset',
|
|
28
|
-
outline: 'revert',
|
|
29
|
-
display: 'flex',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
padding: 'space.025'
|
|
33
|
-
});
|
|
34
|
-
var dropdownWrapperStyles = (0, _primitives.xcss)({
|
|
35
|
-
padding: 'space.075'
|
|
36
|
-
});
|
|
37
|
-
var ClearIndicator = exports.ClearIndicator = function ClearIndicator(_ref) {
|
|
38
|
-
var _ref$clearControlLabe = _ref.clearControlLabel,
|
|
39
|
-
clearControlLabel = _ref$clearControlLabe === void 0 ? 'clear' : _ref$clearControlLabe,
|
|
40
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
|
-
return (0, _react.jsx)(_reactSelect.components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
|
|
42
|
-
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, {
|
|
43
|
-
'aria-hidden': 'false'
|
|
44
|
-
})
|
|
45
|
-
}), (0, _react.jsx)(_primitives.Pressable, {
|
|
46
|
-
xcss: iconContainerStyles,
|
|
47
|
-
tabIndex: -1,
|
|
48
|
-
"aria-label": clearControlLabel
|
|
49
|
-
}, (0, _react.jsx)(_crossCircleSelectClear.default, {
|
|
50
|
-
label: "",
|
|
51
|
-
color: "currentColor",
|
|
52
|
-
LEGACY_size: "small",
|
|
53
|
-
LEGACY_margin: "var(--ds-space-negative-025, -0.125rem)"
|
|
54
|
-
})));
|
|
55
|
-
};
|
|
56
|
-
var DropdownIndicator = exports.DropdownIndicator = function DropdownIndicator(props) {
|
|
57
|
-
return (
|
|
58
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
59
|
-
(0, _react.jsx)(_reactSelect.components.DropdownIndicator, props, (0, _react.jsx)(_primitives.Inline, {
|
|
60
|
-
as: "span",
|
|
61
|
-
xcss: dropdownWrapperStyles
|
|
62
|
-
}, (0, _react.jsx)(_chevronDown.default, {
|
|
63
|
-
color: "currentColor",
|
|
64
|
-
label: "open",
|
|
65
|
-
LEGACY_margin: "var(--ds-space-negative-075, -0.375rem)"
|
|
66
|
-
})))
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
var LoadingIndicator = exports.LoadingIndicator = function LoadingIndicator(props) {
|
|
70
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
|
-
var loadingStyles = (0, _react.css)(props.getStyles('loadingIndicator', props));
|
|
72
|
-
return (
|
|
73
|
-
// This *must* be constructed this way because this is being consumed by
|
|
74
|
-
// `react-select` and we don't control what it wants.
|
|
75
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
76
|
-
(0, _react.jsx)("div", (0, _extends2.default)({
|
|
77
|
-
css: loadingStyles
|
|
78
|
-
}, props.innerProps), (0, _react.jsx)(_spinner.default, {
|
|
79
|
-
size: "small"
|
|
80
|
-
}))
|
|
81
|
-
);
|
|
82
|
-
};
|
|
@@ -1,23 +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.Input = Input;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactSelect = require("@atlaskit/react-select");
|
|
11
|
-
function Input(props) {
|
|
12
|
-
var _ariaDescribedByAttri;
|
|
13
|
-
var ariaDescribedByAttribute = props['aria-describedby'];
|
|
14
|
-
var passed_describedby = props.selectProps['aria-describedby'] || props.selectProps.descriptionId;
|
|
15
|
-
if (passed_describedby && !((_ariaDescribedByAttri = ariaDescribedByAttribute) !== null && _ariaDescribedByAttri !== void 0 && _ariaDescribedByAttri.includes(passed_describedby))) {
|
|
16
|
-
ariaDescribedByAttribute = props['aria-describedby'] + ' ' + passed_describedby;
|
|
17
|
-
} else {
|
|
18
|
-
ariaDescribedByAttribute = props['aria-describedby'] || passed_describedby;
|
|
19
|
-
}
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(_reactSelect.components.Input, (0, _extends2.default)({}, props, {
|
|
21
|
-
"aria-describedby": ariaDescribedByAttribute
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
@@ -1,18 +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.NoOptionsMessage = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _primitives = require("@atlaskit/primitives");
|
|
10
|
-
var _reactSelect = require("@atlaskit/react-select");
|
|
11
|
-
/**
|
|
12
|
-
* __No options message__
|
|
13
|
-
*/
|
|
14
|
-
var NoOptionsMessage = exports.NoOptionsMessage = function NoOptionsMessage(props) {
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_reactSelect.components.NoOptionsMessage, props, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
16
|
-
color: "color.text.subtle"
|
|
17
|
-
}, props.children || "No options"));
|
|
18
|
-
};
|
|
@@ -1,71 +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 LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
8
|
-
import CrossIcon from '@atlaskit/icon/utility/cross';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { Inline, xcss } from '@atlaskit/primitives';
|
|
11
|
-
import { components } from '@atlaskit/react-select';
|
|
12
|
-
export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
|
|
13
|
-
const disabledStyles = css({
|
|
14
|
-
display: 'none'
|
|
15
|
-
});
|
|
16
|
-
const enabledStyles = css({
|
|
17
|
-
display: 'inherit'
|
|
18
|
-
});
|
|
19
|
-
const iconWrapperStyles = xcss({
|
|
20
|
-
padding: 'space.025'
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* __Multi value remove__
|
|
25
|
-
*
|
|
26
|
-
* The icon used to remove individual selections from a multi-select.
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
export const MultiValueRemove = props => {
|
|
30
|
-
const {
|
|
31
|
-
isDisabled
|
|
32
|
-
} = props.selectProps;
|
|
33
|
-
const renderIcon = () => {
|
|
34
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
35
|
-
if (fg('platform-component-visual-refresh')) {
|
|
36
|
-
return jsx(CrossIcon, {
|
|
37
|
-
label: "Clear",
|
|
38
|
-
color: "currentColor"
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
43
|
-
if (fg('platform-visual-refresh-icons-legacy-facade')) {
|
|
44
|
-
return jsx(Inline, {
|
|
45
|
-
xcss: iconWrapperStyles
|
|
46
|
-
}, jsx(CrossIcon, {
|
|
47
|
-
label: "Clear",
|
|
48
|
-
color: "currentColor"
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
return (
|
|
52
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
53
|
-
jsx(LegacySelectClearIcon, {
|
|
54
|
-
label: "Clear",
|
|
55
|
-
primaryColor: "transparent",
|
|
56
|
-
size: "small",
|
|
57
|
-
secondaryColor: "inherit"
|
|
58
|
-
})
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
return (
|
|
62
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
63
|
-
jsx(components.MultiValueRemove, props, jsx("div", {
|
|
64
|
-
css: isDisabled ? disabledStyles : enabledStyles,
|
|
65
|
-
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
|
|
66
|
-
}, renderIcon()))
|
|
67
|
-
);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
71
|
-
export const IndicatorSeparator = null;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
-
/**
|
|
4
|
-
* @jsxRuntime classic
|
|
5
|
-
* @jsx jsx
|
|
6
|
-
*/
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import DownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
10
|
-
import CrossIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
|
|
11
|
-
import { Inline, Pressable, xcss } from '@atlaskit/primitives';
|
|
12
|
-
import { components } from '@atlaskit/react-select';
|
|
13
|
-
import Spinner from '@atlaskit/spinner';
|
|
14
|
-
const iconContainerStyles = xcss({
|
|
15
|
-
all: 'unset',
|
|
16
|
-
outline: 'revert',
|
|
17
|
-
display: 'flex',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
justifyContent: 'center',
|
|
20
|
-
padding: 'space.025'
|
|
21
|
-
});
|
|
22
|
-
const dropdownWrapperStyles = xcss({
|
|
23
|
-
padding: 'space.075'
|
|
24
|
-
});
|
|
25
|
-
export const ClearIndicator = ({
|
|
26
|
-
clearControlLabel = 'clear',
|
|
27
|
-
...props
|
|
28
|
-
}) => {
|
|
29
|
-
return jsx(components.ClearIndicator, _extends({}, props, {
|
|
30
|
-
innerProps: {
|
|
31
|
-
...props.innerProps,
|
|
32
|
-
'aria-hidden': 'false'
|
|
33
|
-
}
|
|
34
|
-
}), jsx(Pressable, {
|
|
35
|
-
xcss: iconContainerStyles,
|
|
36
|
-
tabIndex: -1,
|
|
37
|
-
"aria-label": clearControlLabel
|
|
38
|
-
}, jsx(CrossIcon, {
|
|
39
|
-
label: "",
|
|
40
|
-
color: "currentColor",
|
|
41
|
-
LEGACY_size: "small",
|
|
42
|
-
LEGACY_margin: "var(--ds-space-negative-025, -0.125rem)"
|
|
43
|
-
})));
|
|
44
|
-
};
|
|
45
|
-
export const DropdownIndicator = props =>
|
|
46
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
47
|
-
jsx(components.DropdownIndicator, props, jsx(Inline, {
|
|
48
|
-
as: "span",
|
|
49
|
-
xcss: dropdownWrapperStyles
|
|
50
|
-
}, jsx(DownIcon, {
|
|
51
|
-
color: "currentColor",
|
|
52
|
-
label: "open",
|
|
53
|
-
LEGACY_margin: "var(--ds-space-negative-075, -0.375rem)"
|
|
54
|
-
})));
|
|
55
|
-
export const LoadingIndicator = props => {
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
|
-
const loadingStyles = css(props.getStyles('loadingIndicator', props));
|
|
58
|
-
return (
|
|
59
|
-
// This *must* be constructed this way because this is being consumed by
|
|
60
|
-
// `react-select` and we don't control what it wants.
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
62
|
-
jsx("div", _extends({
|
|
63
|
-
css: loadingStyles
|
|
64
|
-
}, props.innerProps), jsx(Spinner, {
|
|
65
|
-
size: "small"
|
|
66
|
-
}))
|
|
67
|
-
);
|
|
68
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { components } from '@atlaskit/react-select';
|
|
4
|
-
export function Input(props) {
|
|
5
|
-
var _ariaDescribedByAttri;
|
|
6
|
-
let ariaDescribedByAttribute = props['aria-describedby'];
|
|
7
|
-
const passed_describedby = props.selectProps['aria-describedby'] || props.selectProps.descriptionId;
|
|
8
|
-
if (passed_describedby && !((_ariaDescribedByAttri = ariaDescribedByAttribute) !== null && _ariaDescribedByAttri !== void 0 && _ariaDescribedByAttri.includes(passed_describedby))) {
|
|
9
|
-
ariaDescribedByAttribute = props['aria-describedby'] + ' ' + passed_describedby;
|
|
10
|
-
} else {
|
|
11
|
-
ariaDescribedByAttribute = props['aria-describedby'] || passed_describedby;
|
|
12
|
-
}
|
|
13
|
-
return /*#__PURE__*/React.createElement(components.Input, _extends({}, props, {
|
|
14
|
-
"aria-describedby": ariaDescribedByAttribute
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text } from '@atlaskit/primitives';
|
|
3
|
-
import { components } from '@atlaskit/react-select';
|
|
4
|
-
/**
|
|
5
|
-
* __No options message__
|
|
6
|
-
*/
|
|
7
|
-
export const NoOptionsMessage = props => {
|
|
8
|
-
return /*#__PURE__*/React.createElement(components.NoOptionsMessage, props, /*#__PURE__*/React.createElement(Text, {
|
|
9
|
-
color: "color.text.subtle"
|
|
10
|
-
}, props.children || `No options`));
|
|
11
|
-
};
|
|
@@ -1,69 +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 LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
8
|
-
import CrossIcon from '@atlaskit/icon/utility/cross';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { Inline, xcss } from '@atlaskit/primitives';
|
|
11
|
-
import { components } from '@atlaskit/react-select';
|
|
12
|
-
export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
|
|
13
|
-
var disabledStyles = css({
|
|
14
|
-
display: 'none'
|
|
15
|
-
});
|
|
16
|
-
var enabledStyles = css({
|
|
17
|
-
display: 'inherit'
|
|
18
|
-
});
|
|
19
|
-
var iconWrapperStyles = xcss({
|
|
20
|
-
padding: 'space.025'
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* __Multi value remove__
|
|
25
|
-
*
|
|
26
|
-
* The icon used to remove individual selections from a multi-select.
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
export var MultiValueRemove = function MultiValueRemove(props) {
|
|
30
|
-
var isDisabled = props.selectProps.isDisabled;
|
|
31
|
-
var renderIcon = function renderIcon() {
|
|
32
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
33
|
-
if (fg('platform-component-visual-refresh')) {
|
|
34
|
-
return jsx(CrossIcon, {
|
|
35
|
-
label: "Clear",
|
|
36
|
-
color: "currentColor"
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
41
|
-
if (fg('platform-visual-refresh-icons-legacy-facade')) {
|
|
42
|
-
return jsx(Inline, {
|
|
43
|
-
xcss: iconWrapperStyles
|
|
44
|
-
}, jsx(CrossIcon, {
|
|
45
|
-
label: "Clear",
|
|
46
|
-
color: "currentColor"
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
return (
|
|
50
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
51
|
-
jsx(LegacySelectClearIcon, {
|
|
52
|
-
label: "Clear",
|
|
53
|
-
primaryColor: "transparent",
|
|
54
|
-
size: "small",
|
|
55
|
-
secondaryColor: "inherit"
|
|
56
|
-
})
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
return (
|
|
60
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
61
|
-
jsx(components.MultiValueRemove, props, jsx("div", {
|
|
62
|
-
css: isDisabled ? disabledStyles : enabledStyles,
|
|
63
|
-
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
|
|
64
|
-
}, renderIcon()))
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
69
|
-
export var IndicatorSeparator = null;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["clearControlLabel"];
|
|
5
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
8
|
-
/**
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
import { css, jsx } from '@emotion/react';
|
|
14
|
-
import DownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
15
|
-
import CrossIcon from '@atlaskit/icon/utility/migration/cross-circle--select-clear';
|
|
16
|
-
import { Inline, Pressable, xcss } from '@atlaskit/primitives';
|
|
17
|
-
import { components } from '@atlaskit/react-select';
|
|
18
|
-
import Spinner from '@atlaskit/spinner';
|
|
19
|
-
var iconContainerStyles = xcss({
|
|
20
|
-
all: 'unset',
|
|
21
|
-
outline: 'revert',
|
|
22
|
-
display: 'flex',
|
|
23
|
-
alignItems: 'center',
|
|
24
|
-
justifyContent: 'center',
|
|
25
|
-
padding: 'space.025'
|
|
26
|
-
});
|
|
27
|
-
var dropdownWrapperStyles = xcss({
|
|
28
|
-
padding: 'space.075'
|
|
29
|
-
});
|
|
30
|
-
export var ClearIndicator = function ClearIndicator(_ref) {
|
|
31
|
-
var _ref$clearControlLabe = _ref.clearControlLabel,
|
|
32
|
-
clearControlLabel = _ref$clearControlLabe === void 0 ? 'clear' : _ref$clearControlLabe,
|
|
33
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
return jsx(components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
|
|
35
|
-
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, {
|
|
36
|
-
'aria-hidden': 'false'
|
|
37
|
-
})
|
|
38
|
-
}), jsx(Pressable, {
|
|
39
|
-
xcss: iconContainerStyles,
|
|
40
|
-
tabIndex: -1,
|
|
41
|
-
"aria-label": clearControlLabel
|
|
42
|
-
}, jsx(CrossIcon, {
|
|
43
|
-
label: "",
|
|
44
|
-
color: "currentColor",
|
|
45
|
-
LEGACY_size: "small",
|
|
46
|
-
LEGACY_margin: "var(--ds-space-negative-025, -0.125rem)"
|
|
47
|
-
})));
|
|
48
|
-
};
|
|
49
|
-
export var DropdownIndicator = function DropdownIndicator(props) {
|
|
50
|
-
return (
|
|
51
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
52
|
-
jsx(components.DropdownIndicator, props, jsx(Inline, {
|
|
53
|
-
as: "span",
|
|
54
|
-
xcss: dropdownWrapperStyles
|
|
55
|
-
}, jsx(DownIcon, {
|
|
56
|
-
color: "currentColor",
|
|
57
|
-
label: "open",
|
|
58
|
-
LEGACY_margin: "var(--ds-space-negative-075, -0.375rem)"
|
|
59
|
-
})))
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
export var LoadingIndicator = function LoadingIndicator(props) {
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
|
-
var loadingStyles = css(props.getStyles('loadingIndicator', props));
|
|
65
|
-
return (
|
|
66
|
-
// This *must* be constructed this way because this is being consumed by
|
|
67
|
-
// `react-select` and we don't control what it wants.
|
|
68
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
69
|
-
jsx("div", _extends({
|
|
70
|
-
css: loadingStyles
|
|
71
|
-
}, props.innerProps), jsx(Spinner, {
|
|
72
|
-
size: "small"
|
|
73
|
-
}))
|
|
74
|
-
);
|
|
75
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { components } from '@atlaskit/react-select';
|
|
4
|
-
export function Input(props) {
|
|
5
|
-
var _ariaDescribedByAttri;
|
|
6
|
-
var ariaDescribedByAttribute = props['aria-describedby'];
|
|
7
|
-
var passed_describedby = props.selectProps['aria-describedby'] || props.selectProps.descriptionId;
|
|
8
|
-
if (passed_describedby && !((_ariaDescribedByAttri = ariaDescribedByAttribute) !== null && _ariaDescribedByAttri !== void 0 && _ariaDescribedByAttri.includes(passed_describedby))) {
|
|
9
|
-
ariaDescribedByAttribute = props['aria-describedby'] + ' ' + passed_describedby;
|
|
10
|
-
} else {
|
|
11
|
-
ariaDescribedByAttribute = props['aria-describedby'] || passed_describedby;
|
|
12
|
-
}
|
|
13
|
-
return /*#__PURE__*/React.createElement(components.Input, _extends({}, props, {
|
|
14
|
-
"aria-describedby": ariaDescribedByAttribute
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text } from '@atlaskit/primitives';
|
|
3
|
-
import { components } from '@atlaskit/react-select';
|
|
4
|
-
/**
|
|
5
|
-
* __No options message__
|
|
6
|
-
*/
|
|
7
|
-
export var NoOptionsMessage = function NoOptionsMessage(props) {
|
|
8
|
-
return /*#__PURE__*/React.createElement(components.NoOptionsMessage, props, /*#__PURE__*/React.createElement(Text, {
|
|
9
|
-
color: "color.text.subtle"
|
|
10
|
-
}, props.children || "No options"));
|
|
11
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type MultiValueRemoveProps } from '../types';
|
|
7
|
-
export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
|
|
8
|
-
/**
|
|
9
|
-
* __Multi value remove__
|
|
10
|
-
*
|
|
11
|
-
* The icon used to remove individual selections from a multi-select.
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
export declare const MultiValueRemove: (props: MultiValueRemoveProps<any>) => jsx.JSX.Element;
|
|
15
|
-
export declare const IndicatorSeparator: null;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type ClearIndicatorProps, type DropdownIndicatorProps, type LoadingIndicatorProps } from '../types';
|
|
7
|
-
export declare const ClearIndicator: <Option extends unknown, IsMulti extends boolean = false>({ clearControlLabel, ...props }: ClearIndicatorProps<Option, IsMulti>) => jsx.JSX.Element;
|
|
8
|
-
export declare const DropdownIndicator: <Option extends unknown, IsMulti extends boolean = false>(props: DropdownIndicatorProps<Option, IsMulti>) => jsx.JSX.Element;
|
|
9
|
-
export declare const LoadingIndicator: <Option extends unknown, IsMulti extends boolean = false>(props: LoadingIndicatorProps<Option, IsMulti>) => jsx.JSX.Element;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type MultiValueRemoveProps } from '../types';
|
|
7
|
-
export { ClearIndicator, DropdownIndicator, LoadingIndicator } from './indicators';
|
|
8
|
-
/**
|
|
9
|
-
* __Multi value remove__
|
|
10
|
-
*
|
|
11
|
-
* The icon used to remove individual selections from a multi-select.
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
export declare const MultiValueRemove: (props: MultiValueRemoveProps<any>) => jsx.JSX.Element;
|
|
15
|
-
export declare const IndicatorSeparator: null;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type ClearIndicatorProps, type DropdownIndicatorProps, type LoadingIndicatorProps } from '../types';
|
|
7
|
-
export declare const ClearIndicator: <Option extends unknown, IsMulti extends boolean = false>({ clearControlLabel, ...props }: ClearIndicatorProps<Option, IsMulti>) => jsx.JSX.Element;
|
|
8
|
-
export declare const DropdownIndicator: <Option extends unknown, IsMulti extends boolean = false>(props: DropdownIndicatorProps<Option, IsMulti>) => jsx.JSX.Element;
|
|
9
|
-
export declare const LoadingIndicator: <Option extends unknown, IsMulti extends boolean = false>(props: LoadingIndicatorProps<Option, IsMulti>) => jsx.JSX.Element;
|