@atlaskit/react-select 3.4.1 → 3.4.3
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/dist/cjs/components/input.compiled.css +4 -0
- package/dist/cjs/components/input.js +28 -3
- package/dist/cjs/components/internal/a11y-text.compiled.css +0 -1
- package/dist/cjs/components/internal/a11y-text.js +1 -1
- package/dist/cjs/components/internal/required-input.compiled.css +0 -1
- package/dist/cjs/components/internal/required-input.js +1 -1
- package/dist/cjs/select.js +12 -4
- package/dist/es2019/components/input.compiled.css +4 -0
- package/dist/es2019/components/input.js +28 -3
- package/dist/es2019/components/internal/a11y-text.compiled.css +0 -1
- package/dist/es2019/components/internal/a11y-text.js +1 -1
- package/dist/es2019/components/internal/required-input.compiled.css +0 -1
- package/dist/es2019/components/internal/required-input.js +1 -1
- package/dist/es2019/select.js +12 -4
- package/dist/esm/components/input.compiled.css +4 -0
- package/dist/esm/components/input.js +28 -3
- package/dist/esm/components/internal/a11y-text.compiled.css +0 -1
- package/dist/esm/components/internal/a11y-text.js +1 -1
- package/dist/esm/components/internal/required-input.compiled.css +0 -1
- package/dist/esm/components/internal/required-input.js +1 -1
- package/dist/esm/select.js +12 -4
- package/dist/types/components/index.d.ts +20 -20
- package/dist/types/components/internal/a11y-text.d.ts +1 -2
- package/dist/types/select.d.ts +29 -29
- package/dist/types/styles.d.ts +21 -21
- package/dist/types/utils.d.ts +1 -1
- package/dist/types-ts4.5/components/index.d.ts +20 -20
- package/dist/types-ts4.5/components/internal/a11y-text.d.ts +1 -2
- package/dist/types-ts4.5/select.d.ts +29 -29
- package/dist/types-ts4.5/styles.d.ts +21 -21
- package/dist/types-ts4.5/utils.d.ts +1 -1
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 3.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#200709](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200709)
|
|
8
|
+
[`4e4c55892eecf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4e4c55892eecf) -
|
|
9
|
+
[ux] Prevent input from being cleared from selecting an option with multi-select enabled and fix
|
|
10
|
+
cursor in search field
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 3.4.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#199732](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199732)
|
|
18
|
+
[`6a3dc4b33b338`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a3dc4b33b338) -
|
|
19
|
+
Clean up label property in css
|
|
20
|
+
|
|
3
21
|
## 3.4.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
._11q7idpf{background:0}
|
|
3
3
|
._19itidpf{border:0}
|
|
4
4
|
._1h9u1kw7:after{font:inherit}
|
|
5
|
+
._1r04idpf{inset:0}
|
|
5
6
|
._ckog1yjy:after{grid-area:1/2}
|
|
6
7
|
._eq43idpf:after{border:0}
|
|
7
8
|
._nd5l1sux{grid-area:1/1/2/3}
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
._1bsb1osq{width:100%}
|
|
20
21
|
._1doyidpf:after{margin-bottom:0}
|
|
21
22
|
._1e0c1n7u{display:inline-grid}
|
|
23
|
+
._1e0c1txw{display:flex}
|
|
22
24
|
._1k96idpf:after{padding-left:0}
|
|
23
25
|
._1nn4glyw:after{outline-style:none}
|
|
24
26
|
._1o9zkb7n{flex-shrink:1}
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
._ca0qidpf{padding-top:0}
|
|
37
39
|
._i0dl1wug{flex-basis:auto}
|
|
38
40
|
._j8d6idpf:after{margin-top:0}
|
|
41
|
+
._kqswh2mm{position:relative}
|
|
42
|
+
._kqswstnw{position:absolute}
|
|
39
43
|
._n3tdidpf{padding-bottom:0}
|
|
40
44
|
._otyridpf{margin-bottom:0}
|
|
41
45
|
._pfztidpf:after{margin-left:0}
|
|
@@ -13,17 +13,23 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _react2 = require("@compiled/react");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _utils = require("../utils");
|
|
17
18
|
var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName", "testId"];
|
|
18
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
20
|
var inputCSS = exports.inputCSS = function inputCSS() {
|
|
20
21
|
return {};
|
|
21
22
|
};
|
|
22
|
-
var
|
|
23
|
+
var inputStylesOld = {
|
|
23
24
|
root: "_16jlkb7n _1o9zkb7n _i0dl1wug _nd5l1sux _1mouv77o _195gv77o _1rjcv77o _1e0c1n7u _yv0e12qd _syaz1fxt _j8d6idpf _1av2idpf _1doyidpf _pfztidpf _uoe3idpf _1recidpf _70xridpf _1k96idpf _eq43idpf _1h9u1kw7 _ckog1yjy _1x651r31 _1nn4glyw _1rzeidpf _1yd8yh40 _aetr11ps _uy7x15vq _1qjlqvpr",
|
|
24
25
|
disabled: "_3um015vq"
|
|
25
26
|
};
|
|
26
|
-
var
|
|
27
|
+
var inputStyles = {
|
|
28
|
+
root: "_16jlkb7n _1o9zkb7n _i0dl1wug _nd5l1sux _1mouv77o _195gv77o _1rjcv77o _kqswh2mm _1e0c1txw _yv0e12qd _syaz1fxt _j8d6idpf _1av2idpf _1doyidpf _pfztidpf _uoe3idpf _1recidpf _70xridpf _1k96idpf _eq43idpf _1h9u1kw7 _ckog1yjy _1x651r31 _1nn4glyw _1rzeidpf _1yd8yh40 _aetr11ps _uy7x15vq _1qjlqvpr",
|
|
29
|
+
disabled: "_3um015vq"
|
|
30
|
+
};
|
|
31
|
+
var nativeInputStylesOld = null;
|
|
32
|
+
var nativeInputStyles = null;
|
|
27
33
|
var hidden = null;
|
|
28
34
|
var Input = function Input(props) {
|
|
29
35
|
var builtinCX = props.cx,
|
|
@@ -42,12 +48,31 @@ var Input = function Input(props) {
|
|
|
42
48
|
}),
|
|
43
49
|
css = _getStyleProps.css,
|
|
44
50
|
className = _getStyleProps.className;
|
|
51
|
+
if ((0, _platformFeatureFlags.fg)('platform_do_not_clear_input_for_multiselect')) {
|
|
52
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
54
|
+
style: css
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
56
|
+
,
|
|
57
|
+
className: (0, _runtime.ax)([inputStyles.root, isDisabled && inputStyles.disabled, (0, _react2.cx)(className, xcss, '-Input')]),
|
|
58
|
+
"data-value": value || '',
|
|
59
|
+
"data-testid": dataId && "".concat(dataId, "-container")
|
|
60
|
+
}, /*#__PURE__*/React.createElement("input", (0, _extends2.default)({
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
62
|
+
className: (0, _runtime.ax)(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1r04idpf _11q7idpf _19itidpf _11c81kw7 _nd5l1yjy _12ji1r31 _1qu2glyw _12y3idpf _1bsb1osq _1ul9yh40 _kqswstnw _syaz1kw7 _tzy4kb7n", isHidden && "_tzy4idpf", builtinCX({
|
|
63
|
+
input: true
|
|
64
|
+
}, inputClassName, '-input')]),
|
|
65
|
+
ref: innerRef,
|
|
66
|
+
disabled: isDisabled,
|
|
67
|
+
"data-testid": dataId
|
|
68
|
+
}, innerProps)));
|
|
69
|
+
}
|
|
45
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
71
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
47
72
|
style: css
|
|
48
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
49
74
|
,
|
|
50
|
-
className: (0, _runtime.ax)([
|
|
75
|
+
className: (0, _runtime.ax)([inputStylesOld.root, isDisabled && inputStylesOld.disabled, (0, _react2.cx)(className, xcss, '-Input')]),
|
|
51
76
|
"data-value": value || '',
|
|
52
77
|
"data-testid": dataId && "".concat(dataId, "-container")
|
|
53
78
|
}, /*#__PURE__*/React.createElement("input", (0, _extends2.default)({
|
|
@@ -17,7 +17,7 @@ var styles = null;
|
|
|
17
17
|
var A11yText = function A11yText(props) {
|
|
18
18
|
return /*#__PURE__*/React.createElement("span", (0, _extends2.default)({
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
20
|
-
className: (0, _runtime.ax)(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _1pbydx66 _ogto7mnp
|
|
20
|
+
className: (0, _runtime.ax)(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _1pbydx66 _ogto7mnp _uiztglyw _o5721q9c", "-a11yText"])
|
|
21
21
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
22
22
|
}, props));
|
|
23
23
|
};
|
|
@@ -23,7 +23,7 @@ var RequiredInput = function RequiredInput(_ref) {
|
|
|
23
23
|
"aria-hidden": "true"
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
25
25
|
,
|
|
26
|
-
className: (0, _runtime.ax)(["_1bsb1osq _kqswstnw _u7coidpf _rjxpidpf _1e02idpf
|
|
26
|
+
className: (0, _runtime.ax)(["_1bsb1osq _kqswstnw _u7coidpf _rjxpidpf _1e02idpf _tzy4idpf _lcxvglyw", "-requiredInput"]),
|
|
27
27
|
onFocus: onFocus,
|
|
28
28
|
// Prevent `Switching from uncontrolled to controlled` error
|
|
29
29
|
value: "",
|
package/dist/cjs/select.js
CHANGED
|
@@ -293,10 +293,18 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
293
293
|
closeMenuOnSelect = _this$props2.closeMenuOnSelect,
|
|
294
294
|
isMulti = _this$props2.isMulti,
|
|
295
295
|
inputValue = _this$props2.inputValue;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
// for multiple selection options, do not clear the search input value
|
|
297
|
+
if (isMulti && (0, _platformFeatureFlags.fg)('platform_do_not_clear_input_for_multiselect')) {
|
|
298
|
+
_this.onInputChange(inputValue, {
|
|
299
|
+
action: 'set-value',
|
|
300
|
+
prevInputValue: inputValue
|
|
301
|
+
});
|
|
302
|
+
} else {
|
|
303
|
+
_this.onInputChange('', {
|
|
304
|
+
action: 'set-value',
|
|
305
|
+
prevInputValue: inputValue
|
|
306
|
+
});
|
|
307
|
+
}
|
|
300
308
|
if (closeMenuOnSelect) {
|
|
301
309
|
_this.setState({
|
|
302
310
|
inputIsHiddenAfterUpdate: !isMulti
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
._11q7idpf{background:0}
|
|
3
3
|
._19itidpf{border:0}
|
|
4
4
|
._1h9u1kw7:after{font:inherit}
|
|
5
|
+
._1r04idpf{inset:0}
|
|
5
6
|
._ckog1yjy:after{grid-area:1/2}
|
|
6
7
|
._eq43idpf:after{border:0}
|
|
7
8
|
._nd5l1sux{grid-area:1/1/2/3}
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
._1bsb1osq{width:100%}
|
|
20
21
|
._1doyidpf:after{margin-bottom:0}
|
|
21
22
|
._1e0c1n7u{display:inline-grid}
|
|
23
|
+
._1e0c1txw{display:flex}
|
|
22
24
|
._1k96idpf:after{padding-left:0}
|
|
23
25
|
._1nn4glyw:after{outline-style:none}
|
|
24
26
|
._1o9zkb7n{flex-shrink:1}
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
._ca0qidpf{padding-top:0}
|
|
37
39
|
._i0dl1wug{flex-basis:auto}
|
|
38
40
|
._j8d6idpf:after{margin-top:0}
|
|
41
|
+
._kqswh2mm{position:relative}
|
|
42
|
+
._kqswstnw{position:absolute}
|
|
39
43
|
._n3tdidpf{padding-bottom:0}
|
|
40
44
|
._otyridpf{margin-bottom:0}
|
|
41
45
|
._pfztidpf:after{margin-left:0}
|
|
@@ -4,13 +4,19 @@ import "./input.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { cleanCommonProps, getStyleProps } from '../utils';
|
|
8
9
|
export const inputCSS = () => ({});
|
|
9
|
-
const
|
|
10
|
+
const inputStylesOld = {
|
|
10
11
|
root: "_16jlkb7n _1o9zkb7n _i0dl1wug _nd5l1sux _1mouv77o _195gv77o _1rjcv77o _1e0c1n7u _yv0e12qd _syaz1fxt _j8d6idpf _1av2idpf _1doyidpf _pfztidpf _uoe3idpf _1recidpf _70xridpf _1k96idpf _eq43idpf _1h9u1kw7 _ckog1yjy _1x651r31 _1nn4glyw _1rzeidpf _1yd8yh40 _aetr11ps _uy7x15vq _1qjlqvpr",
|
|
11
12
|
disabled: "_3um015vq"
|
|
12
13
|
};
|
|
13
|
-
const
|
|
14
|
+
const inputStyles = {
|
|
15
|
+
root: "_16jlkb7n _1o9zkb7n _i0dl1wug _nd5l1sux _1mouv77o _195gv77o _1rjcv77o _kqswh2mm _1e0c1txw _yv0e12qd _syaz1fxt _j8d6idpf _1av2idpf _1doyidpf _pfztidpf _uoe3idpf _1recidpf _70xridpf _1k96idpf _eq43idpf _1h9u1kw7 _ckog1yjy _1x651r31 _1nn4glyw _1rzeidpf _1yd8yh40 _aetr11ps _uy7x15vq _1qjlqvpr",
|
|
16
|
+
disabled: "_3um015vq"
|
|
17
|
+
};
|
|
18
|
+
const nativeInputStylesOld = null;
|
|
19
|
+
const nativeInputStyles = null;
|
|
14
20
|
const hidden = null;
|
|
15
21
|
const Input = props => {
|
|
16
22
|
const {
|
|
@@ -33,12 +39,31 @@ const Input = props => {
|
|
|
33
39
|
} = getStyleProps(props, 'input', {
|
|
34
40
|
'input-container': true
|
|
35
41
|
});
|
|
42
|
+
if (fg('platform_do_not_clear_input_for_multiselect')) {
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
45
|
+
style: css
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
47
|
+
,
|
|
48
|
+
className: ax([inputStyles.root, isDisabled && inputStyles.disabled, cx(className, xcss, '-Input')]),
|
|
49
|
+
"data-value": value || '',
|
|
50
|
+
"data-testid": dataId && `${dataId}-container`
|
|
51
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
53
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1r04idpf _11q7idpf _19itidpf _11c81kw7 _nd5l1yjy _12ji1r31 _1qu2glyw _12y3idpf _1bsb1osq _1ul9yh40 _kqswstnw _syaz1kw7 _tzy4kb7n", isHidden && "_tzy4idpf", builtinCX({
|
|
54
|
+
input: true
|
|
55
|
+
}, inputClassName, '-input')]),
|
|
56
|
+
ref: innerRef,
|
|
57
|
+
disabled: isDisabled,
|
|
58
|
+
"data-testid": dataId
|
|
59
|
+
}, innerProps)));
|
|
60
|
+
}
|
|
36
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
38
63
|
style: css
|
|
39
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
40
65
|
,
|
|
41
|
-
className: ax([
|
|
66
|
+
className: ax([inputStylesOld.root, isDisabled && inputStylesOld.disabled, cx(className, xcss, '-Input')]),
|
|
42
67
|
"data-value": value || '',
|
|
43
68
|
"data-testid": dataId && `${dataId}-container`
|
|
44
69
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
@@ -7,7 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
const styles = null;
|
|
8
8
|
const A11yText = props => /*#__PURE__*/React.createElement("span", _extends({
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
10
|
-
className: ax(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _1pbydx66 _ogto7mnp
|
|
10
|
+
className: ax(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _1pbydx66 _ogto7mnp _uiztglyw _o5721q9c", "-a11yText"])
|
|
11
11
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
12
12
|
}, props));
|
|
13
13
|
export default A11yText;
|
|
@@ -14,7 +14,7 @@ const RequiredInput = ({
|
|
|
14
14
|
"aria-hidden": "true"
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
16
16
|
,
|
|
17
|
-
className: ax(["_1bsb1osq _kqswstnw _u7coidpf _rjxpidpf _1e02idpf
|
|
17
|
+
className: ax(["_1bsb1osq _kqswstnw _u7coidpf _rjxpidpf _1e02idpf _tzy4idpf _lcxvglyw", "-requiredInput"]),
|
|
18
18
|
onFocus: onFocus,
|
|
19
19
|
// Prevent `Switching from uncontrolled to controlled` error
|
|
20
20
|
value: "",
|
package/dist/es2019/select.js
CHANGED
|
@@ -264,10 +264,18 @@ export default class Select extends Component {
|
|
|
264
264
|
isMulti,
|
|
265
265
|
inputValue
|
|
266
266
|
} = this.props;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
// for multiple selection options, do not clear the search input value
|
|
268
|
+
if (isMulti && fg('platform_do_not_clear_input_for_multiselect')) {
|
|
269
|
+
this.onInputChange(inputValue, {
|
|
270
|
+
action: 'set-value',
|
|
271
|
+
prevInputValue: inputValue
|
|
272
|
+
});
|
|
273
|
+
} else {
|
|
274
|
+
this.onInputChange('', {
|
|
275
|
+
action: 'set-value',
|
|
276
|
+
prevInputValue: inputValue
|
|
277
|
+
});
|
|
278
|
+
}
|
|
271
279
|
if (closeMenuOnSelect) {
|
|
272
280
|
this.setState({
|
|
273
281
|
inputIsHiddenAfterUpdate: !isMulti
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
._11q7idpf{background:0}
|
|
3
3
|
._19itidpf{border:0}
|
|
4
4
|
._1h9u1kw7:after{font:inherit}
|
|
5
|
+
._1r04idpf{inset:0}
|
|
5
6
|
._ckog1yjy:after{grid-area:1/2}
|
|
6
7
|
._eq43idpf:after{border:0}
|
|
7
8
|
._nd5l1sux{grid-area:1/1/2/3}
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
._1bsb1osq{width:100%}
|
|
20
21
|
._1doyidpf:after{margin-bottom:0}
|
|
21
22
|
._1e0c1n7u{display:inline-grid}
|
|
23
|
+
._1e0c1txw{display:flex}
|
|
22
24
|
._1k96idpf:after{padding-left:0}
|
|
23
25
|
._1nn4glyw:after{outline-style:none}
|
|
24
26
|
._1o9zkb7n{flex-shrink:1}
|
|
@@ -36,6 +38,8 @@
|
|
|
36
38
|
._ca0qidpf{padding-top:0}
|
|
37
39
|
._i0dl1wug{flex-basis:auto}
|
|
38
40
|
._j8d6idpf:after{margin-top:0}
|
|
41
|
+
._kqswh2mm{position:relative}
|
|
42
|
+
._kqswstnw{position:absolute}
|
|
39
43
|
._n3tdidpf{padding-bottom:0}
|
|
40
44
|
._otyridpf{margin-bottom:0}
|
|
41
45
|
._pfztidpf:after{margin-left:0}
|
|
@@ -6,15 +6,21 @@ import "./input.compiled.css";
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { cx } from '@compiled/react';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { cleanCommonProps, getStyleProps } from '../utils';
|
|
10
11
|
export var inputCSS = function inputCSS() {
|
|
11
12
|
return {};
|
|
12
13
|
};
|
|
13
|
-
var
|
|
14
|
+
var inputStylesOld = {
|
|
14
15
|
root: "_16jlkb7n _1o9zkb7n _i0dl1wug _nd5l1sux _1mouv77o _195gv77o _1rjcv77o _1e0c1n7u _yv0e12qd _syaz1fxt _j8d6idpf _1av2idpf _1doyidpf _pfztidpf _uoe3idpf _1recidpf _70xridpf _1k96idpf _eq43idpf _1h9u1kw7 _ckog1yjy _1x651r31 _1nn4glyw _1rzeidpf _1yd8yh40 _aetr11ps _uy7x15vq _1qjlqvpr",
|
|
15
16
|
disabled: "_3um015vq"
|
|
16
17
|
};
|
|
17
|
-
var
|
|
18
|
+
var inputStyles = {
|
|
19
|
+
root: "_16jlkb7n _1o9zkb7n _i0dl1wug _nd5l1sux _1mouv77o _195gv77o _1rjcv77o _kqswh2mm _1e0c1txw _yv0e12qd _syaz1fxt _j8d6idpf _1av2idpf _1doyidpf _pfztidpf _uoe3idpf _1recidpf _70xridpf _1k96idpf _eq43idpf _1h9u1kw7 _ckog1yjy _1x651r31 _1nn4glyw _1rzeidpf _1yd8yh40 _aetr11ps _uy7x15vq _1qjlqvpr",
|
|
20
|
+
disabled: "_3um015vq"
|
|
21
|
+
};
|
|
22
|
+
var nativeInputStylesOld = null;
|
|
23
|
+
var nativeInputStyles = null;
|
|
18
24
|
var hidden = null;
|
|
19
25
|
var Input = function Input(props) {
|
|
20
26
|
var builtinCX = props.cx,
|
|
@@ -33,12 +39,31 @@ var Input = function Input(props) {
|
|
|
33
39
|
}),
|
|
34
40
|
css = _getStyleProps.css,
|
|
35
41
|
className = _getStyleProps.className;
|
|
42
|
+
if (fg('platform_do_not_clear_input_for_multiselect')) {
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
45
|
+
style: css
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
47
|
+
,
|
|
48
|
+
className: ax([inputStyles.root, isDisabled && inputStyles.disabled, cx(className, xcss, '-Input')]),
|
|
49
|
+
"data-value": value || '',
|
|
50
|
+
"data-testid": dataId && "".concat(dataId, "-container")
|
|
51
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
53
|
+
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1r04idpf _11q7idpf _19itidpf _11c81kw7 _nd5l1yjy _12ji1r31 _1qu2glyw _12y3idpf _1bsb1osq _1ul9yh40 _kqswstnw _syaz1kw7 _tzy4kb7n", isHidden && "_tzy4idpf", builtinCX({
|
|
54
|
+
input: true
|
|
55
|
+
}, inputClassName, '-input')]),
|
|
56
|
+
ref: innerRef,
|
|
57
|
+
disabled: isDisabled,
|
|
58
|
+
"data-testid": dataId
|
|
59
|
+
}, innerProps)));
|
|
60
|
+
}
|
|
36
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
38
63
|
style: css
|
|
39
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
40
65
|
,
|
|
41
|
-
className: ax([
|
|
66
|
+
className: ax([inputStylesOld.root, isDisabled && inputStylesOld.disabled, cx(className, xcss, '-Input')]),
|
|
42
67
|
"data-value": value || '',
|
|
43
68
|
"data-testid": dataId && "".concat(dataId, "-container")
|
|
44
69
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
@@ -8,7 +8,7 @@ var styles = null;
|
|
|
8
8
|
var A11yText = function A11yText(props) {
|
|
9
9
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
11
|
-
className: ax(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _1pbydx66 _ogto7mnp
|
|
11
|
+
className: ax(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _1pbydx66 _ogto7mnp _uiztglyw _o5721q9c", "-a11yText"])
|
|
12
12
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
13
13
|
}, props));
|
|
14
14
|
};
|
|
@@ -14,7 +14,7 @@ var RequiredInput = function RequiredInput(_ref) {
|
|
|
14
14
|
"aria-hidden": "true"
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
16
16
|
,
|
|
17
|
-
className: ax(["_1bsb1osq _kqswstnw _u7coidpf _rjxpidpf _1e02idpf
|
|
17
|
+
className: ax(["_1bsb1osq _kqswstnw _u7coidpf _rjxpidpf _1e02idpf _tzy4idpf _lcxvglyw", "-requiredInput"]),
|
|
18
18
|
onFocus: onFocus,
|
|
19
19
|
// Prevent `Switching from uncontrolled to controlled` error
|
|
20
20
|
value: "",
|
package/dist/esm/select.js
CHANGED
|
@@ -284,10 +284,18 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
284
284
|
closeMenuOnSelect = _this$props2.closeMenuOnSelect,
|
|
285
285
|
isMulti = _this$props2.isMulti,
|
|
286
286
|
inputValue = _this$props2.inputValue;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
287
|
+
// for multiple selection options, do not clear the search input value
|
|
288
|
+
if (isMulti && fg('platform_do_not_clear_input_for_multiselect')) {
|
|
289
|
+
_this.onInputChange(inputValue, {
|
|
290
|
+
action: 'set-value',
|
|
291
|
+
prevInputValue: inputValue
|
|
292
|
+
});
|
|
293
|
+
} else {
|
|
294
|
+
_this.onInputChange('', {
|
|
295
|
+
action: 'set-value',
|
|
296
|
+
prevInputValue: inputValue
|
|
297
|
+
});
|
|
298
|
+
}
|
|
291
299
|
if (closeMenuOnSelect) {
|
|
292
300
|
_this.setState({
|
|
293
301
|
inputIsHiddenAfterUpdate: !isMulti
|
|
@@ -37,27 +37,27 @@ export interface SelectComponents<Option, IsMulti extends boolean, Group extends
|
|
|
37
37
|
export type SelectComponentsConfig<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Partial<SelectComponents<Option, IsMulti, Group>>;
|
|
38
38
|
export declare const components: {
|
|
39
39
|
ClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => JSX.Element;
|
|
40
|
-
Control: <
|
|
41
|
-
DropdownIndicator: <
|
|
42
|
-
Group: <
|
|
43
|
-
GroupHeading: <
|
|
44
|
-
IndicatorsContainer: <
|
|
45
|
-
Input: <
|
|
46
|
-
LoadingIndicator: <
|
|
47
|
-
Menu: <
|
|
48
|
-
MenuList: <
|
|
49
|
-
MenuPortal: <
|
|
50
|
-
LoadingMessage: <
|
|
51
|
-
NoOptionsMessage: <
|
|
52
|
-
MultiValue: <
|
|
53
|
-
MultiValueContainer: <
|
|
54
|
-
MultiValueLabel: <
|
|
40
|
+
Control: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ControlProps<Option, IsMulti, Group>) => JSX.Element;
|
|
41
|
+
DropdownIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>) => JSX.Element;
|
|
42
|
+
Group: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: GroupProps<Option, IsMulti, Group>) => JSX.Element;
|
|
43
|
+
GroupHeading: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: GroupHeadingProps<Option, IsMulti, Group>) => JSX.Element;
|
|
44
|
+
IndicatorsContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorsContainerProps<Option, IsMulti, Group>) => JSX.Element;
|
|
45
|
+
Input: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => JSX.Element;
|
|
46
|
+
LoadingIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ innerProps, isRtl, size, isCompact, xcss, ...restProps }: LoadingIndicatorProps<Option, IsMulti, Group>) => JSX.Element;
|
|
47
|
+
Menu: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuProps<Option, IsMulti, Group>) => JSX.Element;
|
|
48
|
+
MenuList: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuListProps<Option, IsMulti, Group>) => JSX.Element;
|
|
49
|
+
MenuPortal: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuPortalProps<Option, IsMulti, Group>) => JSX.Element | null;
|
|
50
|
+
LoadingMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, xcss, ...restProps }: NoticeProps<Option, IsMulti, Group>) => JSX.Element;
|
|
51
|
+
NoOptionsMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, xcss, ...restProps }: NoticeProps<Option, IsMulti, Group>) => JSX.Element;
|
|
52
|
+
MultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => JSX.Element;
|
|
53
|
+
MultiValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, isFocused, isDisabled, className, xcss, }: MultiValueGenericProps<Option, IsMulti, Group>) => JSX.Element;
|
|
54
|
+
MultiValueLabel: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, isDisabled, hasEllipsis, className, xcss, }: MultiValueGenericProps<Option, IsMulti, Group>) => JSX.Element;
|
|
55
55
|
MultiValueRemove: typeof MultiValueRemove;
|
|
56
|
-
Option: <
|
|
57
|
-
Placeholder: <
|
|
58
|
-
SelectContainer: <
|
|
59
|
-
SingleValue: <
|
|
60
|
-
ValueContainer: <
|
|
56
|
+
Option: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => JSX.Element;
|
|
57
|
+
Placeholder: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => JSX.Element;
|
|
58
|
+
SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => JSX.Element;
|
|
59
|
+
SingleValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => JSX.Element;
|
|
60
|
+
ValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => JSX.Element;
|
|
61
61
|
};
|
|
62
62
|
type SelectComponentsGeneric = typeof components;
|
|
63
63
|
interface ComponentsProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
package/dist/types/select.d.ts
CHANGED
|
@@ -446,15 +446,15 @@ export declare const defaultProps: {
|
|
|
446
446
|
escapeClearsValue: boolean;
|
|
447
447
|
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
448
448
|
formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
|
|
449
|
-
getOptionLabel: <
|
|
450
|
-
getOptionValue: <
|
|
449
|
+
getOptionLabel: <Option>(option: Option) => string;
|
|
450
|
+
getOptionValue: <Option>(option: Option) => string;
|
|
451
451
|
isDisabled: boolean;
|
|
452
452
|
isLoading: boolean;
|
|
453
453
|
isMulti: boolean;
|
|
454
454
|
isRtl: boolean;
|
|
455
455
|
isSearchable: boolean;
|
|
456
456
|
hasOtherFocusableElements: boolean;
|
|
457
|
-
isOptionDisabled: <
|
|
457
|
+
isOptionDisabled: <Option>(option: Option) => boolean;
|
|
458
458
|
loadingMessage: () => string;
|
|
459
459
|
maxMenuHeight: number;
|
|
460
460
|
minMenuHeight: number;
|
|
@@ -526,15 +526,15 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
526
526
|
escapeClearsValue: boolean;
|
|
527
527
|
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
528
528
|
formatGroupLabel: <Option_1, Group_1 extends GroupBase<Option_1>>(group: Group_1) => string;
|
|
529
|
-
getOptionLabel: <
|
|
530
|
-
getOptionValue: <
|
|
529
|
+
getOptionLabel: <Option_1>(option: Option_1) => string;
|
|
530
|
+
getOptionValue: <Option_1>(option: Option_1) => string;
|
|
531
531
|
isDisabled: boolean;
|
|
532
532
|
isLoading: boolean;
|
|
533
533
|
isMulti: boolean;
|
|
534
534
|
isRtl: boolean;
|
|
535
535
|
isSearchable: boolean;
|
|
536
536
|
hasOtherFocusableElements: boolean;
|
|
537
|
-
isOptionDisabled: <
|
|
537
|
+
isOptionDisabled: <Option_1>(option: Option_1) => boolean;
|
|
538
538
|
loadingMessage: () => string;
|
|
539
539
|
maxMenuHeight: number;
|
|
540
540
|
minMenuHeight: number;
|
|
@@ -618,7 +618,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
618
618
|
clearValue: () => void;
|
|
619
619
|
cx: (...args: any) => string;
|
|
620
620
|
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
621
|
-
getClassNames: <
|
|
621
|
+
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
622
622
|
getValue: () => Options<Option>;
|
|
623
623
|
hasValue: boolean;
|
|
624
624
|
isMulti: IsMulti;
|
|
@@ -626,36 +626,36 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
626
626
|
options: OptionsOrGroups<Option, Group>;
|
|
627
627
|
selectOption: (newValue: Option) => void;
|
|
628
628
|
selectProps: Readonly<SelectProps<Option, IsMulti, Group>>;
|
|
629
|
-
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option
|
|
629
|
+
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option) => void;
|
|
630
630
|
};
|
|
631
631
|
getOptionLabel: (data: Option) => string;
|
|
632
632
|
getOptionValue: (data: Option) => string;
|
|
633
633
|
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
634
634
|
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
635
|
-
getElementId: (element:
|
|
635
|
+
getElementId: (element: "group" | "input" | "listbox" | "option" | "placeholder" | "live-region" | "multi-message" | "single-value" | "selected-value") => string;
|
|
636
636
|
getComponents: () => {
|
|
637
637
|
ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
638
|
-
Control: <
|
|
639
|
-
DropdownIndicator: <
|
|
640
|
-
Group: <
|
|
641
|
-
GroupHeading: <
|
|
642
|
-
IndicatorsContainer: <
|
|
643
|
-
Input: <
|
|
644
|
-
LoadingIndicator: <
|
|
645
|
-
Menu: <
|
|
646
|
-
MenuList: <
|
|
647
|
-
MenuPortal: <
|
|
648
|
-
LoadingMessage: <
|
|
649
|
-
NoOptionsMessage: <
|
|
650
|
-
MultiValue: <
|
|
651
|
-
MultiValueContainer: <
|
|
652
|
-
MultiValueLabel: <
|
|
638
|
+
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ControlProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
639
|
+
DropdownIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").DropdownIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
640
|
+
Group: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
641
|
+
GroupHeading: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupHeadingProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
642
|
+
IndicatorsContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").IndicatorsContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
643
|
+
Input: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").InputProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
644
|
+
LoadingIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ innerProps, isRtl, size, isCompact, xcss, ...restProps }: import(".").LoadingIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
645
|
+
Menu: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import("./components/menu").MenuProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
646
|
+
MenuList: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import("./components/menu").MenuListProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
647
|
+
MenuPortal: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import("./components/menu").MenuPortalProps<Option_1, IsMulti_1, Group_1>) => JSX.Element | null;
|
|
648
|
+
LoadingMessage: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, xcss, ...restProps }: import("./components/menu").NoticeProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
649
|
+
NoOptionsMessage: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, xcss, ...restProps }: import("./components/menu").NoticeProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
650
|
+
MultiValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").MultiValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
651
|
+
MultiValueContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, isFocused, isDisabled, className, xcss, }: import(".").MultiValueGenericProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
652
|
+
MultiValueLabel: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, isDisabled, hasEllipsis, className, xcss, }: import(".").MultiValueGenericProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
653
653
|
MultiValueRemove: typeof import("./components/multi-value").MultiValueRemove;
|
|
654
|
-
Option: <
|
|
655
|
-
Placeholder: <
|
|
656
|
-
SelectContainer: <
|
|
657
|
-
SingleValue: <
|
|
658
|
-
ValueContainer: <
|
|
654
|
+
Option: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").OptionProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
655
|
+
Placeholder: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").PlaceholderProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
656
|
+
SelectContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
657
|
+
SingleValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").SingleValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
658
|
+
ValueContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ValueContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
659
659
|
};
|
|
660
660
|
buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
661
661
|
getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -42,25 +42,25 @@ export type ClassNamesConfig<Option = unknown, IsMulti extends boolean = boolean
|
|
|
42
42
|
[K in keyof StylesProps<Option, IsMulti, Group>]?: (props: StylesProps<Option, IsMulti, Group>[K]) => string;
|
|
43
43
|
};
|
|
44
44
|
export declare function mergeStyles<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(source: StylesConfig<Option, IsMulti, Group>, target?: StylesConfig<Option, IsMulti, Group>): {
|
|
45
|
-
clearIndicator?: ((base:
|
|
46
|
-
container?: ((base:
|
|
47
|
-
control?: ((base:
|
|
48
|
-
dropdownIndicator?: ((base:
|
|
49
|
-
group?: ((base:
|
|
50
|
-
groupHeading?: ((base:
|
|
51
|
-
indicatorsContainer?: ((base:
|
|
52
|
-
input?: ((base:
|
|
53
|
-
loadingIndicator?: ((base:
|
|
54
|
-
loadingMessage?: ((base:
|
|
55
|
-
menu?: ((base:
|
|
56
|
-
menuList?: ((base:
|
|
57
|
-
menuPortal?: ((base:
|
|
58
|
-
multiValue?: ((base:
|
|
59
|
-
multiValueLabel?: ((base:
|
|
60
|
-
multiValueRemove?: ((base:
|
|
61
|
-
noOptionsMessage?: ((base:
|
|
62
|
-
option?: ((base:
|
|
63
|
-
placeholder?: ((base:
|
|
64
|
-
singleValue?: ((base:
|
|
65
|
-
valueContainer?: ((base:
|
|
45
|
+
clearIndicator?: ((base: CSSObjectWithLabel, props: ClearIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
46
|
+
container?: ((base: CSSObjectWithLabel, props: ContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
47
|
+
control?: ((base: CSSObjectWithLabel, props: ControlProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
48
|
+
dropdownIndicator?: ((base: CSSObjectWithLabel, props: DropdownIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
49
|
+
group?: ((base: CSSObjectWithLabel, props: GroupProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
50
|
+
groupHeading?: ((base: CSSObjectWithLabel, props: GroupHeadingProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
51
|
+
indicatorsContainer?: ((base: CSSObjectWithLabel, props: IndicatorsContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
52
|
+
input?: ((base: CSSObjectWithLabel, props: InputProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
53
|
+
loadingIndicator?: ((base: CSSObjectWithLabel, props: LoadingIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
54
|
+
loadingMessage?: ((base: CSSObjectWithLabel, props: NoticeProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
55
|
+
menu?: ((base: CSSObjectWithLabel, props: MenuProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
56
|
+
menuList?: ((base: CSSObjectWithLabel, props: MenuListProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
57
|
+
menuPortal?: ((base: CSSObjectWithLabel, props: PortalStyleArgs) => CSSObjectWithLabel) | undefined;
|
|
58
|
+
multiValue?: ((base: CSSObjectWithLabel, props: MultiValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
59
|
+
multiValueLabel?: ((base: CSSObjectWithLabel, props: MultiValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
60
|
+
multiValueRemove?: ((base: CSSObjectWithLabel, props: MultiValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
61
|
+
noOptionsMessage?: ((base: CSSObjectWithLabel, props: NoticeProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
62
|
+
option?: ((base: CSSObjectWithLabel, props: OptionProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
63
|
+
placeholder?: ((base: CSSObjectWithLabel, props: PlaceholderProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
64
|
+
singleValue?: ((base: CSSObjectWithLabel, props: SingleValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
65
|
+
valueContainer?: ((base: CSSObjectWithLabel, props: ValueContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
66
66
|
};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const noop: () => void;
|
|
|
4
4
|
export declare function classNames(prefix?: string | null, state?: ClassNamesState, ...classNameList: string[]): string;
|
|
5
5
|
export declare const cleanValue: <Option>(value: PropsValue<Option>) => Options<Option>;
|
|
6
6
|
export declare const cleanCommonProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, AdditionalProps>(props: Partial<CommonPropsAndClassName<Option, IsMulti, Group>> & AdditionalProps) => Omit<AdditionalProps, keyof CommonPropsAndClassName<Option, IsMulti, Group>>;
|
|
7
|
-
export declare const getStyleProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, Key extends keyof StylesProps<Option, IsMulti, Group>>(props: Pick<CommonPropsAndClassName<Option, IsMulti, Group>,
|
|
7
|
+
export declare const getStyleProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, Key extends keyof StylesProps<Option, IsMulti, Group>>(props: Pick<CommonPropsAndClassName<Option, IsMulti, Group>, "cx" | "getStyles" | "getClassNames" | "className"> & StylesProps<Option, IsMulti, Group>[Key], name: Key, classNamesState?: ClassNamesState) => {
|
|
8
8
|
css: any;
|
|
9
9
|
className: string;
|
|
10
10
|
};
|
|
@@ -37,27 +37,27 @@ export interface SelectComponents<Option, IsMulti extends boolean, Group extends
|
|
|
37
37
|
export type SelectComponentsConfig<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Partial<SelectComponents<Option, IsMulti, Group>>;
|
|
38
38
|
export declare const components: {
|
|
39
39
|
ClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => JSX.Element;
|
|
40
|
-
Control: <
|
|
41
|
-
DropdownIndicator: <
|
|
42
|
-
Group: <
|
|
43
|
-
GroupHeading: <
|
|
44
|
-
IndicatorsContainer: <
|
|
45
|
-
Input: <
|
|
46
|
-
LoadingIndicator: <
|
|
47
|
-
Menu: <
|
|
48
|
-
MenuList: <
|
|
49
|
-
MenuPortal: <
|
|
50
|
-
LoadingMessage: <
|
|
51
|
-
NoOptionsMessage: <
|
|
52
|
-
MultiValue: <
|
|
53
|
-
MultiValueContainer: <
|
|
54
|
-
MultiValueLabel: <
|
|
40
|
+
Control: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ControlProps<Option, IsMulti, Group>) => JSX.Element;
|
|
41
|
+
DropdownIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>) => JSX.Element;
|
|
42
|
+
Group: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: GroupProps<Option, IsMulti, Group>) => JSX.Element;
|
|
43
|
+
GroupHeading: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: GroupHeadingProps<Option, IsMulti, Group>) => JSX.Element;
|
|
44
|
+
IndicatorsContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorsContainerProps<Option, IsMulti, Group>) => JSX.Element;
|
|
45
|
+
Input: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => JSX.Element;
|
|
46
|
+
LoadingIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ innerProps, isRtl, size, isCompact, xcss, ...restProps }: LoadingIndicatorProps<Option, IsMulti, Group>) => JSX.Element;
|
|
47
|
+
Menu: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuProps<Option, IsMulti, Group>) => JSX.Element;
|
|
48
|
+
MenuList: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuListProps<Option, IsMulti, Group>) => JSX.Element;
|
|
49
|
+
MenuPortal: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuPortalProps<Option, IsMulti, Group>) => JSX.Element | null;
|
|
50
|
+
LoadingMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, xcss, ...restProps }: NoticeProps<Option, IsMulti, Group>) => JSX.Element;
|
|
51
|
+
NoOptionsMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, xcss, ...restProps }: NoticeProps<Option, IsMulti, Group>) => JSX.Element;
|
|
52
|
+
MultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => JSX.Element;
|
|
53
|
+
MultiValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, isFocused, isDisabled, className, xcss, }: MultiValueGenericProps<Option, IsMulti, Group>) => JSX.Element;
|
|
54
|
+
MultiValueLabel: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, isDisabled, hasEllipsis, className, xcss, }: MultiValueGenericProps<Option, IsMulti, Group>) => JSX.Element;
|
|
55
55
|
MultiValueRemove: typeof MultiValueRemove;
|
|
56
|
-
Option: <
|
|
57
|
-
Placeholder: <
|
|
58
|
-
SelectContainer: <
|
|
59
|
-
SingleValue: <
|
|
60
|
-
ValueContainer: <
|
|
56
|
+
Option: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => JSX.Element;
|
|
57
|
+
Placeholder: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => JSX.Element;
|
|
58
|
+
SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => JSX.Element;
|
|
59
|
+
SingleValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => JSX.Element;
|
|
60
|
+
ValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => JSX.Element;
|
|
61
61
|
};
|
|
62
62
|
type SelectComponentsGeneric = typeof components;
|
|
63
63
|
interface ComponentsProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
@@ -446,15 +446,15 @@ export declare const defaultProps: {
|
|
|
446
446
|
escapeClearsValue: boolean;
|
|
447
447
|
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
448
448
|
formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
|
|
449
|
-
getOptionLabel: <
|
|
450
|
-
getOptionValue: <
|
|
449
|
+
getOptionLabel: <Option>(option: Option) => string;
|
|
450
|
+
getOptionValue: <Option>(option: Option) => string;
|
|
451
451
|
isDisabled: boolean;
|
|
452
452
|
isLoading: boolean;
|
|
453
453
|
isMulti: boolean;
|
|
454
454
|
isRtl: boolean;
|
|
455
455
|
isSearchable: boolean;
|
|
456
456
|
hasOtherFocusableElements: boolean;
|
|
457
|
-
isOptionDisabled: <
|
|
457
|
+
isOptionDisabled: <Option>(option: Option) => boolean;
|
|
458
458
|
loadingMessage: () => string;
|
|
459
459
|
maxMenuHeight: number;
|
|
460
460
|
minMenuHeight: number;
|
|
@@ -526,15 +526,15 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
526
526
|
escapeClearsValue: boolean;
|
|
527
527
|
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
528
528
|
formatGroupLabel: <Option_1, Group_1 extends GroupBase<Option_1>>(group: Group_1) => string;
|
|
529
|
-
getOptionLabel: <
|
|
530
|
-
getOptionValue: <
|
|
529
|
+
getOptionLabel: <Option_1>(option: Option_1) => string;
|
|
530
|
+
getOptionValue: <Option_1>(option: Option_1) => string;
|
|
531
531
|
isDisabled: boolean;
|
|
532
532
|
isLoading: boolean;
|
|
533
533
|
isMulti: boolean;
|
|
534
534
|
isRtl: boolean;
|
|
535
535
|
isSearchable: boolean;
|
|
536
536
|
hasOtherFocusableElements: boolean;
|
|
537
|
-
isOptionDisabled: <
|
|
537
|
+
isOptionDisabled: <Option_1>(option: Option_1) => boolean;
|
|
538
538
|
loadingMessage: () => string;
|
|
539
539
|
maxMenuHeight: number;
|
|
540
540
|
minMenuHeight: number;
|
|
@@ -618,7 +618,7 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
618
618
|
clearValue: () => void;
|
|
619
619
|
cx: (...args: any) => string;
|
|
620
620
|
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
621
|
-
getClassNames: <
|
|
621
|
+
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
622
622
|
getValue: () => Options<Option>;
|
|
623
623
|
hasValue: boolean;
|
|
624
624
|
isMulti: IsMulti;
|
|
@@ -626,36 +626,36 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
626
626
|
options: OptionsOrGroups<Option, Group>;
|
|
627
627
|
selectOption: (newValue: Option) => void;
|
|
628
628
|
selectProps: Readonly<SelectProps<Option, IsMulti, Group>>;
|
|
629
|
-
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option
|
|
629
|
+
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option) => void;
|
|
630
630
|
};
|
|
631
631
|
getOptionLabel: (data: Option) => string;
|
|
632
632
|
getOptionValue: (data: Option) => string;
|
|
633
633
|
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
634
634
|
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
635
|
-
getElementId: (element:
|
|
635
|
+
getElementId: (element: "group" | "input" | "listbox" | "option" | "placeholder" | "live-region" | "multi-message" | "single-value" | "selected-value") => string;
|
|
636
636
|
getComponents: () => {
|
|
637
637
|
ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
638
|
-
Control: <
|
|
639
|
-
DropdownIndicator: <
|
|
640
|
-
Group: <
|
|
641
|
-
GroupHeading: <
|
|
642
|
-
IndicatorsContainer: <
|
|
643
|
-
Input: <
|
|
644
|
-
LoadingIndicator: <
|
|
645
|
-
Menu: <
|
|
646
|
-
MenuList: <
|
|
647
|
-
MenuPortal: <
|
|
648
|
-
LoadingMessage: <
|
|
649
|
-
NoOptionsMessage: <
|
|
650
|
-
MultiValue: <
|
|
651
|
-
MultiValueContainer: <
|
|
652
|
-
MultiValueLabel: <
|
|
638
|
+
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ControlProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
639
|
+
DropdownIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").DropdownIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
640
|
+
Group: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
641
|
+
GroupHeading: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupHeadingProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
642
|
+
IndicatorsContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").IndicatorsContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
643
|
+
Input: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").InputProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
644
|
+
LoadingIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ innerProps, isRtl, size, isCompact, xcss, ...restProps }: import(".").LoadingIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
645
|
+
Menu: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import("./components/menu").MenuProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
646
|
+
MenuList: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import("./components/menu").MenuListProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
647
|
+
MenuPortal: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import("./components/menu").MenuPortalProps<Option_1, IsMulti_1, Group_1>) => JSX.Element | null;
|
|
648
|
+
LoadingMessage: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, xcss, ...restProps }: import("./components/menu").NoticeProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
649
|
+
NoOptionsMessage: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, xcss, ...restProps }: import("./components/menu").NoticeProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
650
|
+
MultiValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").MultiValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
651
|
+
MultiValueContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, isFocused, isDisabled, className, xcss, }: import(".").MultiValueGenericProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
652
|
+
MultiValueLabel: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>({ children, innerProps, isDisabled, hasEllipsis, className, xcss, }: import(".").MultiValueGenericProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
653
653
|
MultiValueRemove: typeof import("./components/multi-value").MultiValueRemove;
|
|
654
|
-
Option: <
|
|
655
|
-
Placeholder: <
|
|
656
|
-
SelectContainer: <
|
|
657
|
-
SingleValue: <
|
|
658
|
-
ValueContainer: <
|
|
654
|
+
Option: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").OptionProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
655
|
+
Placeholder: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").PlaceholderProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
656
|
+
SelectContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
657
|
+
SingleValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").SingleValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
658
|
+
ValueContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ValueContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
659
659
|
};
|
|
660
660
|
buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
661
661
|
getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
@@ -42,25 +42,25 @@ export type ClassNamesConfig<Option = unknown, IsMulti extends boolean = boolean
|
|
|
42
42
|
[K in keyof StylesProps<Option, IsMulti, Group>]?: (props: StylesProps<Option, IsMulti, Group>[K]) => string;
|
|
43
43
|
};
|
|
44
44
|
export declare function mergeStyles<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(source: StylesConfig<Option, IsMulti, Group>, target?: StylesConfig<Option, IsMulti, Group>): {
|
|
45
|
-
clearIndicator?: ((base:
|
|
46
|
-
container?: ((base:
|
|
47
|
-
control?: ((base:
|
|
48
|
-
dropdownIndicator?: ((base:
|
|
49
|
-
group?: ((base:
|
|
50
|
-
groupHeading?: ((base:
|
|
51
|
-
indicatorsContainer?: ((base:
|
|
52
|
-
input?: ((base:
|
|
53
|
-
loadingIndicator?: ((base:
|
|
54
|
-
loadingMessage?: ((base:
|
|
55
|
-
menu?: ((base:
|
|
56
|
-
menuList?: ((base:
|
|
57
|
-
menuPortal?: ((base:
|
|
58
|
-
multiValue?: ((base:
|
|
59
|
-
multiValueLabel?: ((base:
|
|
60
|
-
multiValueRemove?: ((base:
|
|
61
|
-
noOptionsMessage?: ((base:
|
|
62
|
-
option?: ((base:
|
|
63
|
-
placeholder?: ((base:
|
|
64
|
-
singleValue?: ((base:
|
|
65
|
-
valueContainer?: ((base:
|
|
45
|
+
clearIndicator?: ((base: CSSObjectWithLabel, props: ClearIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
46
|
+
container?: ((base: CSSObjectWithLabel, props: ContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
47
|
+
control?: ((base: CSSObjectWithLabel, props: ControlProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
48
|
+
dropdownIndicator?: ((base: CSSObjectWithLabel, props: DropdownIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
49
|
+
group?: ((base: CSSObjectWithLabel, props: GroupProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
50
|
+
groupHeading?: ((base: CSSObjectWithLabel, props: GroupHeadingProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
51
|
+
indicatorsContainer?: ((base: CSSObjectWithLabel, props: IndicatorsContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
52
|
+
input?: ((base: CSSObjectWithLabel, props: InputProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
53
|
+
loadingIndicator?: ((base: CSSObjectWithLabel, props: LoadingIndicatorProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
54
|
+
loadingMessage?: ((base: CSSObjectWithLabel, props: NoticeProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
55
|
+
menu?: ((base: CSSObjectWithLabel, props: MenuProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
56
|
+
menuList?: ((base: CSSObjectWithLabel, props: MenuListProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
57
|
+
menuPortal?: ((base: CSSObjectWithLabel, props: PortalStyleArgs) => CSSObjectWithLabel) | undefined;
|
|
58
|
+
multiValue?: ((base: CSSObjectWithLabel, props: MultiValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
59
|
+
multiValueLabel?: ((base: CSSObjectWithLabel, props: MultiValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
60
|
+
multiValueRemove?: ((base: CSSObjectWithLabel, props: MultiValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
61
|
+
noOptionsMessage?: ((base: CSSObjectWithLabel, props: NoticeProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
62
|
+
option?: ((base: CSSObjectWithLabel, props: OptionProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
63
|
+
placeholder?: ((base: CSSObjectWithLabel, props: PlaceholderProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
64
|
+
singleValue?: ((base: CSSObjectWithLabel, props: SingleValueProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
65
|
+
valueContainer?: ((base: CSSObjectWithLabel, props: ValueContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel) | undefined;
|
|
66
66
|
};
|
|
@@ -4,7 +4,7 @@ export declare const noop: () => void;
|
|
|
4
4
|
export declare function classNames(prefix?: string | null, state?: ClassNamesState, ...classNameList: string[]): string;
|
|
5
5
|
export declare const cleanValue: <Option>(value: PropsValue<Option>) => Options<Option>;
|
|
6
6
|
export declare const cleanCommonProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, AdditionalProps>(props: Partial<CommonPropsAndClassName<Option, IsMulti, Group>> & AdditionalProps) => Omit<AdditionalProps, keyof CommonPropsAndClassName<Option, IsMulti, Group>>;
|
|
7
|
-
export declare const getStyleProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, Key extends keyof StylesProps<Option, IsMulti, Group>>(props: Pick<CommonPropsAndClassName<Option, IsMulti, Group>,
|
|
7
|
+
export declare const getStyleProps: <Option, IsMulti extends boolean, Group extends GroupBase<Option>, Key extends keyof StylesProps<Option, IsMulti, Group>>(props: Pick<CommonPropsAndClassName<Option, IsMulti, Group>, "cx" | "getStyles" | "getClassNames" | "className"> & StylesProps<Option, IsMulti, Group>[Key], name: Key, classNamesState?: ClassNamesState) => {
|
|
8
8
|
css: any;
|
|
9
9
|
className: string;
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-select",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"description": "A forked version of react-select to only be used in atlaskit/select",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
32
|
-
"@atlaskit/icon": "^27.
|
|
32
|
+
"@atlaskit/icon": "^27.12.0",
|
|
33
33
|
"@atlaskit/layering": "^3.0.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
35
35
|
"@atlaskit/primitives": "^14.11.0",
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
52
52
|
"@testing-library/react": "^13.4.0",
|
|
53
53
|
"@testing-library/user-event": "^14.4.3",
|
|
54
|
-
"jest-in-case": "^1.0.2"
|
|
55
|
-
"typescript": "~5.4.2"
|
|
54
|
+
"jest-in-case": "^1.0.2"
|
|
56
55
|
},
|
|
57
56
|
"platform-feature-flags": {
|
|
58
57
|
"custom-interactive-elements-not-keyboard-focusable": {
|
|
@@ -66,6 +65,9 @@
|
|
|
66
65
|
},
|
|
67
66
|
"platform_dst_select_menu_close_on_blur": {
|
|
68
67
|
"type": "boolean"
|
|
68
|
+
},
|
|
69
|
+
"platform_do_not_clear_input_for_multiselect": {
|
|
70
|
+
"type": "boolean"
|
|
69
71
|
}
|
|
70
72
|
},
|
|
71
73
|
"techstack": {
|