@atlaskit/react-select 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/components/multi-value.compiled.css +0 -7
- package/dist/cjs/components/multi-value.js +8 -11
- package/dist/cjs/styles.js +0 -1
- package/dist/es2019/components/multi-value.compiled.css +0 -7
- package/dist/es2019/components/multi-value.js +8 -11
- package/dist/es2019/styles.js +0 -1
- package/dist/esm/components/multi-value.compiled.css +0 -7
- package/dist/esm/components/multi-value.js +8 -11
- package/dist/esm/styles.js +0 -1
- package/dist/types/components/index.d.ts +31 -31
- package/dist/types/select.d.ts +6 -128
- package/dist/types/styles.d.ts +1 -21
- package/dist/types-ts4.5/components/index.d.ts +31 -31
- package/dist/types-ts4.5/select.d.ts +6 -128
- package/dist/types-ts4.5/styles.d.ts +1 -21
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 3.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a3ea761f650bb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3ea761f650bb) -
|
|
8
|
+
[ux] Updates react-select styles to reflect our new visual design language. These changes were
|
|
9
|
+
previously behind a feature flag and are now fully rolled out.
|
|
10
|
+
|
|
11
|
+
## 3.7.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`437668dfbdec9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/437668dfbdec9) -
|
|
16
|
+
Add explicit types to a number of DST components
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 3.7.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
-
._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
2
|
._19itglyw{border:none}
|
|
4
3
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
-
._2rko19qg{border-radius:0 var(--ds-radius-xsmall,2px) var(--ds-radius-xsmall,2px) 0}
|
|
6
4
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
7
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
8
6
|
._1dqonqa1{border-style:solid}
|
|
@@ -16,14 +14,12 @@
|
|
|
16
14
|
._1e0c1txw{display:flex}
|
|
17
15
|
._1e0cglyw{display:none}
|
|
18
16
|
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
19
|
-
._1q51idpf{padding-block-start:0}
|
|
20
17
|
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
21
18
|
._1reo15vq{overflow-x:hidden}
|
|
22
19
|
._1ul9ze3t{min-width:var(--ds-space-0,0)}
|
|
23
20
|
._1wpz1h6o{align-self:center}
|
|
24
21
|
._4cvr1h6o{align-items:center}
|
|
25
22
|
._6rthv77o{margin-block-end:var(--ds-space-025,2px)}
|
|
26
|
-
._85i5idpf{padding-block-end:0}
|
|
27
23
|
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
28
24
|
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
29
25
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
@@ -31,7 +27,6 @@
|
|
|
31
27
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
32
28
|
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
33
29
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
34
|
-
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
35
30
|
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
36
31
|
._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
|
|
37
32
|
._lswu1dx5{fill:var(--ds-text,#000)}
|
|
@@ -48,8 +43,6 @@
|
|
|
48
43
|
._1ah312gs:focus-visible{outline-offset:-2px}
|
|
49
44
|
._13br1jjn:hover{fill:var(--ds-text-danger,#000)}
|
|
50
45
|
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
51
|
-
._irr31yvi:hover{background-color:var(--ds-background-danger-hovered,#ffd5d2)}
|
|
52
46
|
._1di61dty:active{background-color:var(--ds-background-neutral-subtle-pressed,#091e4224)}
|
|
53
|
-
._1di61io2:active{background-color:var(--ds-background-danger-pressed,#fd9891)}
|
|
54
47
|
._i5f81jjn:active{fill:var(--ds-text-danger,#000)}
|
|
55
48
|
@media screen and (-ms-high-contrast:active){._1aewe4h9{border-width:var(--ds-border-width,1px)}._6up51j28{border-color:transparent}._1xdnnqa1{border-style:solid}._3yq3glyw{border:none}}
|
|
@@ -22,10 +22,9 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
22
22
|
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; }
|
|
23
23
|
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; }
|
|
24
24
|
var multiValueStyles = {
|
|
25
|
-
root: "
|
|
25
|
+
root: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _1e0c1txw _1ul9ze3t _1pfhv77o _12l2v77o _6rthv77o _ahbqv77o _bfhk1j9a _p12f1osq _syazjpor _3yq3glyw",
|
|
26
26
|
disabled: "_syaz1lh4 _bfhkm7j4",
|
|
27
|
-
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
|
|
28
|
-
refresh: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _bfhk1j9a"
|
|
27
|
+
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
|
|
29
28
|
};
|
|
30
29
|
var multiValueCSS = exports.multiValueCSS = function multiValueCSS() {
|
|
31
30
|
return {};
|
|
@@ -34,18 +33,16 @@ var multiValueLabelCSS = exports.multiValueLabelCSS = function multiValueLabelCS
|
|
|
34
33
|
return {};
|
|
35
34
|
};
|
|
36
35
|
var multiValueLabelStyles = {
|
|
37
|
-
root: "_1reo15vq _18m915vq _2rkolb4i
|
|
36
|
+
root: "_1reo15vq _18m915vq _2rkolb4i _11c82smr _o5721q9c _y4tiv77o _bozg1b66 _syaz1kw7",
|
|
38
37
|
disabled: "_syaz1lh4",
|
|
39
|
-
ellipsis: "_1bto1l2s"
|
|
40
|
-
refresh: "_11c82smr _1q51idpf _85i5idpf _bozg1b66"
|
|
38
|
+
ellipsis: "_1bto1l2s"
|
|
41
39
|
};
|
|
42
40
|
var multiValueRemoveCSS = exports.multiValueRemoveCSS = function multiValueRemoveCSS() {
|
|
43
41
|
return {};
|
|
44
42
|
};
|
|
45
43
|
var multiValueRemoveStyles = {
|
|
46
44
|
focused: "_bfhkb1q9 _lswu1rrc",
|
|
47
|
-
root: "
|
|
48
|
-
refresh: "_19itglyw _2rko12b0 _bfhksm61 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _syaz1fxt _1q51v77o _y4tiv77o _85i5v77o _bozgv77o _12l2v77o _1ah312gs _irr3166n _1di61dty"
|
|
45
|
+
root: "_19itglyw _2rko12b0 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _bfhksm61 _syaz1fxt _1e0c1txw _lswu1dx5 _1q51v77o _y4tiv77o _85i5v77o _bozgv77o _12l2v77o _1ah312gs _irr3166n _13br1jjn _1di61dty _i5f81jjn"
|
|
49
46
|
};
|
|
50
47
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
51
48
|
var MultiValueContainer = exports.MultiValueContainer = function MultiValueContainer(_ref) {
|
|
@@ -57,7 +54,7 @@ var MultiValueContainer = exports.MultiValueContainer = function MultiValueConta
|
|
|
57
54
|
xcss = _ref.xcss;
|
|
58
55
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, innerProps, {
|
|
59
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
60
|
-
className: (0, _runtime.ax)([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused,
|
|
57
|
+
className: (0, _runtime.ax)([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused, (0, _react2.cx)(className, xcss, '-multiValue')])
|
|
61
58
|
}), children);
|
|
62
59
|
};
|
|
63
60
|
|
|
@@ -71,7 +68,7 @@ var MultiValueLabel = exports.MultiValueLabel = function MultiValueLabel(_ref2)
|
|
|
71
68
|
xcss = _ref2.xcss;
|
|
72
69
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, innerProps, {
|
|
73
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
74
|
-
className: (0, _runtime.ax)([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis,
|
|
71
|
+
className: (0, _runtime.ax)([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis, (0, _react2.cx)(className, xcss, '-MultiValueLabel')])
|
|
75
72
|
}), children);
|
|
76
73
|
};
|
|
77
74
|
var disabledStyles = null;
|
|
@@ -84,7 +81,7 @@ function MultiValueRemove(_ref3) {
|
|
|
84
81
|
xcss = _ref3.xcss;
|
|
85
82
|
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, innerProps, {
|
|
86
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
87
|
-
className: (0, _runtime.ax)([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused,
|
|
84
|
+
className: (0, _runtime.ax)([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused, (0, _react2.cx)(className, xcss, '-MultiValueRemove')])
|
|
88
85
|
}), /*#__PURE__*/React.createElement("div", {
|
|
89
86
|
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon',
|
|
90
87
|
className: (0, _runtime.ax)([isDisabled && "_1e0cglyw", !isDisabled && "_1e0c1kw7"])
|
package/dist/cjs/styles.js
CHANGED
|
@@ -44,7 +44,6 @@ var defaultStyles = exports.defaultStyles = {
|
|
|
44
44
|
};
|
|
45
45
|
// Merge Utility
|
|
46
46
|
// Allows consumers to extend a base Select with additional styles
|
|
47
|
-
|
|
48
47
|
function mergeStyles(source) {
|
|
49
48
|
var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
50
49
|
// initialize with source styles
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
-
._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
2
|
._19itglyw{border:none}
|
|
4
3
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
-
._2rko19qg{border-radius:0 var(--ds-radius-xsmall,2px) var(--ds-radius-xsmall,2px) 0}
|
|
6
4
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
7
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
8
6
|
._1dqonqa1{border-style:solid}
|
|
@@ -16,14 +14,12 @@
|
|
|
16
14
|
._1e0c1txw{display:flex}
|
|
17
15
|
._1e0cglyw{display:none}
|
|
18
16
|
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
19
|
-
._1q51idpf{padding-block-start:0}
|
|
20
17
|
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
21
18
|
._1reo15vq{overflow-x:hidden}
|
|
22
19
|
._1ul9ze3t{min-width:var(--ds-space-0,0)}
|
|
23
20
|
._1wpz1h6o{align-self:center}
|
|
24
21
|
._4cvr1h6o{align-items:center}
|
|
25
22
|
._6rthv77o{margin-block-end:var(--ds-space-025,2px)}
|
|
26
|
-
._85i5idpf{padding-block-end:0}
|
|
27
23
|
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
28
24
|
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
29
25
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
@@ -31,7 +27,6 @@
|
|
|
31
27
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
32
28
|
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
33
29
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
34
|
-
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
35
30
|
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
36
31
|
._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
|
|
37
32
|
._lswu1dx5{fill:var(--ds-text,#000)}
|
|
@@ -48,8 +43,6 @@
|
|
|
48
43
|
._1ah312gs:focus-visible{outline-offset:-2px}
|
|
49
44
|
._13br1jjn:hover{fill:var(--ds-text-danger,#000)}
|
|
50
45
|
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
51
|
-
._irr31yvi:hover{background-color:var(--ds-background-danger-hovered,#ffd5d2)}
|
|
52
46
|
._1di61dty:active{background-color:var(--ds-background-neutral-subtle-pressed,#091e4224)}
|
|
53
|
-
._1di61io2:active{background-color:var(--ds-background-danger-pressed,#fd9891)}
|
|
54
47
|
._i5f81jjn:active{fill:var(--ds-text-danger,#000)}
|
|
55
48
|
@media screen and (-ms-high-contrast:active){._1aewe4h9{border-width:var(--ds-border-width,1px)}._6up51j28{border-color:transparent}._1xdnnqa1{border-style:solid}._3yq3glyw{border:none}}
|
|
@@ -8,24 +8,21 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
8
8
|
import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
9
9
|
import { getStyleProps } from '../utils';
|
|
10
10
|
const multiValueStyles = {
|
|
11
|
-
root: "
|
|
11
|
+
root: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _1e0c1txw _1ul9ze3t _1pfhv77o _12l2v77o _6rthv77o _ahbqv77o _bfhk1j9a _p12f1osq _syazjpor _3yq3glyw",
|
|
12
12
|
disabled: "_syaz1lh4 _bfhkm7j4",
|
|
13
|
-
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
|
|
14
|
-
refresh: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _bfhk1j9a"
|
|
13
|
+
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
|
|
15
14
|
};
|
|
16
15
|
export const multiValueCSS = () => ({});
|
|
17
16
|
export const multiValueLabelCSS = () => ({});
|
|
18
17
|
const multiValueLabelStyles = {
|
|
19
|
-
root: "_1reo15vq _18m915vq _2rkolb4i
|
|
18
|
+
root: "_1reo15vq _18m915vq _2rkolb4i _11c82smr _o5721q9c _y4tiv77o _bozg1b66 _syaz1kw7",
|
|
20
19
|
disabled: "_syaz1lh4",
|
|
21
|
-
ellipsis: "_1bto1l2s"
|
|
22
|
-
refresh: "_11c82smr _1q51idpf _85i5idpf _bozg1b66"
|
|
20
|
+
ellipsis: "_1bto1l2s"
|
|
23
21
|
};
|
|
24
22
|
export const multiValueRemoveCSS = () => ({});
|
|
25
23
|
const multiValueRemoveStyles = {
|
|
26
24
|
focused: "_bfhkb1q9 _lswu1rrc",
|
|
27
|
-
root: "
|
|
28
|
-
refresh: "_19itglyw _2rko12b0 _bfhksm61 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _syaz1fxt _1q51v77o _y4tiv77o _85i5v77o _bozgv77o _12l2v77o _1ah312gs _irr3166n _1di61dty"
|
|
25
|
+
root: "_19itglyw _2rko12b0 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _bfhksm61 _syaz1fxt _1e0c1txw _lswu1dx5 _1q51v77o _y4tiv77o _85i5v77o _bozgv77o _12l2v77o _1ah312gs _irr3166n _13br1jjn _1di61dty _i5f81jjn"
|
|
29
26
|
};
|
|
30
27
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
31
28
|
export const MultiValueContainer = ({
|
|
@@ -38,7 +35,7 @@ export const MultiValueContainer = ({
|
|
|
38
35
|
}) => {
|
|
39
36
|
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
40
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
41
|
-
className: ax([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused,
|
|
38
|
+
className: ax([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused, cx(className, xcss, '-multiValue')])
|
|
42
39
|
}), children);
|
|
43
40
|
};
|
|
44
41
|
|
|
@@ -53,7 +50,7 @@ export const MultiValueLabel = ({
|
|
|
53
50
|
}) => {
|
|
54
51
|
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
55
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
56
|
-
className: ax([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis,
|
|
53
|
+
className: ax([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis, cx(className, xcss, '-MultiValueLabel')])
|
|
57
54
|
}), children);
|
|
58
55
|
};
|
|
59
56
|
const disabledStyles = null;
|
|
@@ -67,7 +64,7 @@ export function MultiValueRemove({
|
|
|
67
64
|
}) {
|
|
68
65
|
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
69
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
70
|
-
className: ax([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused,
|
|
67
|
+
className: ax([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused, cx(className, xcss, '-MultiValueRemove')])
|
|
71
68
|
}), /*#__PURE__*/React.createElement("div", {
|
|
72
69
|
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon',
|
|
73
70
|
className: ax([isDisabled && "_1e0cglyw", !isDisabled && "_1e0c1kw7"])
|
package/dist/es2019/styles.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
-
._11c8dcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
2
|
._19itglyw{border:none}
|
|
4
3
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
|
-
._2rko19qg{border-radius:0 var(--ds-radius-xsmall,2px) var(--ds-radius-xsmall,2px) 0}
|
|
6
4
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
7
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
8
6
|
._1dqonqa1{border-style:solid}
|
|
@@ -16,14 +14,12 @@
|
|
|
16
14
|
._1e0c1txw{display:flex}
|
|
17
15
|
._1e0cglyw{display:none}
|
|
18
16
|
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
19
|
-
._1q51idpf{padding-block-start:0}
|
|
20
17
|
._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
|
|
21
18
|
._1reo15vq{overflow-x:hidden}
|
|
22
19
|
._1ul9ze3t{min-width:var(--ds-space-0,0)}
|
|
23
20
|
._1wpz1h6o{align-self:center}
|
|
24
21
|
._4cvr1h6o{align-items:center}
|
|
25
22
|
._6rthv77o{margin-block-end:var(--ds-space-025,2px)}
|
|
26
|
-
._85i5idpf{padding-block-end:0}
|
|
27
23
|
._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
|
|
28
24
|
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
29
25
|
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
@@ -31,7 +27,6 @@
|
|
|
31
27
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
32
28
|
._bfhkm7j4{background-color:var(--ds-background-neutral,#091e420f)}
|
|
33
29
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
34
|
-
._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
|
|
35
30
|
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
36
31
|
._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
|
|
37
32
|
._lswu1dx5{fill:var(--ds-text,#000)}
|
|
@@ -48,8 +43,6 @@
|
|
|
48
43
|
._1ah312gs:focus-visible{outline-offset:-2px}
|
|
49
44
|
._13br1jjn:hover{fill:var(--ds-text-danger,#000)}
|
|
50
45
|
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
51
|
-
._irr31yvi:hover{background-color:var(--ds-background-danger-hovered,#ffd5d2)}
|
|
52
46
|
._1di61dty:active{background-color:var(--ds-background-neutral-subtle-pressed,#091e4224)}
|
|
53
|
-
._1di61io2:active{background-color:var(--ds-background-danger-pressed,#fd9891)}
|
|
54
47
|
._i5f81jjn:active{fill:var(--ds-text-danger,#000)}
|
|
55
48
|
@media screen and (-ms-high-contrast:active){._1aewe4h9{border-width:var(--ds-border-width,1px)}._6up51j28{border-color:transparent}._1xdnnqa1{border-style:solid}._3yq3glyw{border:none}}
|
|
@@ -11,10 +11,9 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
11
11
|
import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
12
12
|
import { getStyleProps } from '../utils';
|
|
13
13
|
var multiValueStyles = {
|
|
14
|
-
root: "
|
|
14
|
+
root: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _1e0c1txw _1ul9ze3t _1pfhv77o _12l2v77o _6rthv77o _ahbqv77o _bfhk1j9a _p12f1osq _syazjpor _3yq3glyw",
|
|
15
15
|
disabled: "_syaz1lh4 _bfhkm7j4",
|
|
16
|
-
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
|
|
17
|
-
refresh: "_2rko12b0 _1h6d14je _1dqonqa1 _189ee4h9 _bfhk1j9a"
|
|
16
|
+
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1"
|
|
18
17
|
};
|
|
19
18
|
export var multiValueCSS = function multiValueCSS() {
|
|
20
19
|
return {};
|
|
@@ -23,18 +22,16 @@ export var multiValueLabelCSS = function multiValueLabelCSS() {
|
|
|
23
22
|
return {};
|
|
24
23
|
};
|
|
25
24
|
var multiValueLabelStyles = {
|
|
26
|
-
root: "_1reo15vq _18m915vq _2rkolb4i
|
|
25
|
+
root: "_1reo15vq _18m915vq _2rkolb4i _11c82smr _o5721q9c _y4tiv77o _bozg1b66 _syaz1kw7",
|
|
27
26
|
disabled: "_syaz1lh4",
|
|
28
|
-
ellipsis: "_1bto1l2s"
|
|
29
|
-
refresh: "_11c82smr _1q51idpf _85i5idpf _bozg1b66"
|
|
27
|
+
ellipsis: "_1bto1l2s"
|
|
30
28
|
};
|
|
31
29
|
export var multiValueRemoveCSS = function multiValueRemoveCSS() {
|
|
32
30
|
return {};
|
|
33
31
|
};
|
|
34
32
|
var multiValueRemoveStyles = {
|
|
35
33
|
focused: "_bfhkb1q9 _lswu1rrc",
|
|
36
|
-
root: "
|
|
37
|
-
refresh: "_19itglyw _2rko12b0 _bfhksm61 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _syaz1fxt _1q51v77o _y4tiv77o _85i5v77o _bozgv77o _12l2v77o _1ah312gs _irr3166n _1di61dty"
|
|
34
|
+
root: "_19itglyw _2rko12b0 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _bfhksm61 _syaz1fxt _1e0c1txw _lswu1dx5 _1q51v77o _y4tiv77o _85i5v77o _bozgv77o _12l2v77o _1ah312gs _irr3166n _13br1jjn _1di61dty _i5f81jjn"
|
|
38
35
|
};
|
|
39
36
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
40
37
|
export var MultiValueContainer = function MultiValueContainer(_ref) {
|
|
@@ -46,7 +43,7 @@ export var MultiValueContainer = function MultiValueContainer(_ref) {
|
|
|
46
43
|
xcss = _ref.xcss;
|
|
47
44
|
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
48
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
49
|
-
className: ax([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused,
|
|
46
|
+
className: ax([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused, cx(className, xcss, '-multiValue')])
|
|
50
47
|
}), children);
|
|
51
48
|
};
|
|
52
49
|
|
|
@@ -60,7 +57,7 @@ export var MultiValueLabel = function MultiValueLabel(_ref2) {
|
|
|
60
57
|
xcss = _ref2.xcss;
|
|
61
58
|
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
62
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
63
|
-
className: ax([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis,
|
|
60
|
+
className: ax([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis, cx(className, xcss, '-MultiValueLabel')])
|
|
64
61
|
}), children);
|
|
65
62
|
};
|
|
66
63
|
var disabledStyles = null;
|
|
@@ -73,7 +70,7 @@ export function MultiValueRemove(_ref3) {
|
|
|
73
70
|
xcss = _ref3.xcss;
|
|
74
71
|
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
75
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
76
|
-
className: ax([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused,
|
|
73
|
+
className: ax([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused, cx(className, xcss, '-MultiValueRemove')])
|
|
77
74
|
}), /*#__PURE__*/React.createElement("div", {
|
|
78
75
|
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon',
|
|
79
76
|
className: ax([isDisabled && "_1e0cglyw", !isDisabled && "_1e0c1kw7"])
|
package/dist/esm/styles.js
CHANGED
|
@@ -36,7 +36,6 @@ export var defaultStyles = {
|
|
|
36
36
|
};
|
|
37
37
|
// Merge Utility
|
|
38
38
|
// Allows consumers to extend a base Select with additional styles
|
|
39
|
-
|
|
40
39
|
export function mergeStyles(source) {
|
|
41
40
|
var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
42
41
|
// initialize with source styles
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ComponentType } from 'react';
|
|
2
2
|
import { type GroupBase } from '../types';
|
|
3
|
-
import { type ContainerProps, type IndicatorsContainerProps, type ValueContainerProps } from './containers';
|
|
4
|
-
import { type ControlProps } from './control';
|
|
5
|
-
import { type GroupHeadingProps, type GroupProps } from './group';
|
|
6
|
-
import { type ClearIndicatorProps, type DropdownIndicatorProps, type LoadingIndicatorProps } from './indicators';
|
|
7
|
-
import { type InputProps } from './input';
|
|
8
|
-
import { type MenuListProps, type MenuPortalProps, type MenuProps, type NoticeProps } from './menu';
|
|
9
|
-
import { type MultiValueGenericProps, type MultiValueProps, MultiValueRemove, type MultiValueRemoveProps } from './multi-value';
|
|
10
|
-
import { type OptionProps } from './option';
|
|
11
|
-
import { type PlaceholderProps } from './placeholder';
|
|
12
|
-
import { type SingleValueProps } from './single-value';
|
|
3
|
+
import { type ContainerProps, IndicatorsContainer, type IndicatorsContainerProps, SelectContainer, ValueContainer, type ValueContainerProps } from './containers';
|
|
4
|
+
import Control, { type ControlProps } from './control';
|
|
5
|
+
import Group, { GroupHeading, type GroupHeadingProps, type GroupProps } from './group';
|
|
6
|
+
import { ClearIndicator, type ClearIndicatorProps, DropdownIndicator, type DropdownIndicatorProps, LoadingIndicator, type LoadingIndicatorProps } from './indicators';
|
|
7
|
+
import Input, { type InputProps } from './input';
|
|
8
|
+
import Menu, { LoadingMessage, MenuList, type MenuListProps, MenuPortal, type MenuPortalProps, type MenuProps, NoOptionsMessage, type NoticeProps } from './menu';
|
|
9
|
+
import MultiValue, { MultiValueContainer, type MultiValueGenericProps, MultiValueLabel, type MultiValueProps, MultiValueRemove, type MultiValueRemoveProps } from './multi-value';
|
|
10
|
+
import Option, { type OptionProps } from './option';
|
|
11
|
+
import Placeholder, { type PlaceholderProps } from './placeholder';
|
|
12
|
+
import SingleValue, { type SingleValueProps } from './single-value';
|
|
13
13
|
export interface SelectComponents<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
14
14
|
ClearIndicator: ComponentType<ClearIndicatorProps<Option, IsMulti, Group>>;
|
|
15
15
|
Control: ComponentType<ControlProps<Option, IsMulti, Group>>;
|
|
@@ -36,28 +36,28 @@ export interface SelectComponents<Option, IsMulti extends boolean, Group extends
|
|
|
36
36
|
}
|
|
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
|
-
ClearIndicator:
|
|
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:
|
|
39
|
+
ClearIndicator: typeof ClearIndicator;
|
|
40
|
+
Control: typeof Control;
|
|
41
|
+
DropdownIndicator: typeof DropdownIndicator;
|
|
42
|
+
Group: typeof Group;
|
|
43
|
+
GroupHeading: typeof GroupHeading;
|
|
44
|
+
IndicatorsContainer: typeof IndicatorsContainer;
|
|
45
|
+
Input: typeof Input;
|
|
46
|
+
LoadingIndicator: typeof LoadingIndicator;
|
|
47
|
+
Menu: typeof Menu;
|
|
48
|
+
MenuList: typeof MenuList;
|
|
49
|
+
MenuPortal: typeof MenuPortal;
|
|
50
|
+
LoadingMessage: typeof LoadingMessage;
|
|
51
|
+
NoOptionsMessage: typeof NoOptionsMessage;
|
|
52
|
+
MultiValue: typeof MultiValue;
|
|
53
|
+
MultiValueContainer: typeof MultiValueContainer;
|
|
54
|
+
MultiValueLabel: typeof MultiValueLabel;
|
|
55
55
|
MultiValueRemove: typeof MultiValueRemove;
|
|
56
|
-
Option:
|
|
57
|
-
Placeholder:
|
|
58
|
-
SelectContainer:
|
|
59
|
-
SingleValue:
|
|
60
|
-
ValueContainer:
|
|
56
|
+
Option: typeof Option;
|
|
57
|
+
Placeholder: typeof Placeholder;
|
|
58
|
+
SelectContainer: typeof SelectContainer;
|
|
59
|
+
SingleValue: typeof SingleValue;
|
|
60
|
+
ValueContainer: typeof ValueContainer;
|
|
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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { type AriaAttributes, Component, type FocusEventHandler, type FormEventHandler, type KeyboardEventHandler, type MouseEventHandler, type ReactNode, type RefCallback, type TouchEventHandler } from 'react';
|
|
2
2
|
import { type AriaLiveMessages, type AriaSelection } from './accessibility';
|
|
3
|
-
import { type SelectComponentsConfig } from './components';
|
|
3
|
+
import { defaultComponents, type SelectComponentsConfig } from './components';
|
|
4
4
|
import { type FilterOptionOption } from './filters';
|
|
5
5
|
import { type ClassNamesConfig, type StylesConfig, type StylesProps } from './styles';
|
|
6
|
-
import { type ActionMeta, type FocusDirection, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SetValueAction } from './types';
|
|
6
|
+
import { type ActionMeta, type CommonProps, type FocusDirection, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SetValueAction } from './types';
|
|
7
7
|
export type FormatOptionLabelContext = 'menu' | 'value';
|
|
8
8
|
export interface FormatOptionLabelMeta<Option> {
|
|
9
9
|
context: FormatOptionLabelContext;
|
|
@@ -438,50 +438,7 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
438
438
|
*/
|
|
439
439
|
shouldKeepInputOnSelect?: boolean;
|
|
440
440
|
}
|
|
441
|
-
export declare const defaultProps:
|
|
442
|
-
backspaceRemovesValue: boolean;
|
|
443
|
-
blurInputOnSelect: boolean;
|
|
444
|
-
captureMenuScroll: boolean;
|
|
445
|
-
classNames: {};
|
|
446
|
-
closeMenuOnSelect: boolean;
|
|
447
|
-
closeMenuOnScroll: boolean;
|
|
448
|
-
components: {};
|
|
449
|
-
controlShouldRenderValue: boolean;
|
|
450
|
-
escapeClearsValue: boolean;
|
|
451
|
-
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
452
|
-
formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
|
|
453
|
-
getOptionLabel: <Option>(option: Option) => string;
|
|
454
|
-
getOptionValue: <Option>(option: Option) => string;
|
|
455
|
-
isDisabled: boolean;
|
|
456
|
-
isLoading: boolean;
|
|
457
|
-
isMulti: boolean;
|
|
458
|
-
isRtl: boolean;
|
|
459
|
-
isSearchable: boolean;
|
|
460
|
-
isOptionDisabled: <Option>(option: Option) => boolean;
|
|
461
|
-
loadingMessage: () => string;
|
|
462
|
-
maxMenuHeight: number;
|
|
463
|
-
minMenuHeight: number;
|
|
464
|
-
menuIsOpen: boolean;
|
|
465
|
-
menuPlacement: string;
|
|
466
|
-
menuPosition: string;
|
|
467
|
-
menuShouldBlockScroll: boolean;
|
|
468
|
-
menuShouldScrollIntoView: boolean;
|
|
469
|
-
noOptionsMessage: () => string;
|
|
470
|
-
openMenuOnFocus: boolean;
|
|
471
|
-
openMenuOnClick: boolean;
|
|
472
|
-
shouldPreventEscapePropagation: boolean;
|
|
473
|
-
options: never[];
|
|
474
|
-
pageSize: number;
|
|
475
|
-
placeholder: string;
|
|
476
|
-
screenReaderStatus: ({ count }: {
|
|
477
|
-
count: number;
|
|
478
|
-
}) => string;
|
|
479
|
-
styles: {};
|
|
480
|
-
tabIndex: number;
|
|
481
|
-
tabSelectsValue: boolean;
|
|
482
|
-
UNSAFE_is_experimental_generic: boolean;
|
|
483
|
-
shouldKeepInputOnSelect: boolean;
|
|
484
|
-
};
|
|
441
|
+
export declare const defaultProps: Omit<SelectProps<unknown, false, GroupBase<unknown>>, 'inputValue' | 'onChange' | 'onInputChange' | 'onMenuOpen' | 'onMenuClose' | 'value' | 'appearance'>;
|
|
485
442
|
interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
486
443
|
ariaSelection: AriaSelection<Option, IsMulti> | null;
|
|
487
444
|
inputIsHidden: boolean;
|
|
@@ -519,50 +476,7 @@ interface CategorizedGroup<Option, Group extends GroupBase<Option>> {
|
|
|
519
476
|
}
|
|
520
477
|
type CategorizedGroupOrOption<Option, Group extends GroupBase<Option>> = CategorizedGroup<Option, Group> | CategorizedOption<Option>;
|
|
521
478
|
export default class Select<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Component<SelectProps<Option, IsMulti, Group>, State<Option, IsMulti, Group>> {
|
|
522
|
-
static defaultProps:
|
|
523
|
-
backspaceRemovesValue: boolean;
|
|
524
|
-
blurInputOnSelect: boolean;
|
|
525
|
-
captureMenuScroll: boolean;
|
|
526
|
-
classNames: {};
|
|
527
|
-
closeMenuOnSelect: boolean;
|
|
528
|
-
closeMenuOnScroll: boolean;
|
|
529
|
-
components: {};
|
|
530
|
-
controlShouldRenderValue: boolean;
|
|
531
|
-
escapeClearsValue: boolean;
|
|
532
|
-
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
533
|
-
formatGroupLabel: <Option_1, Group_1 extends GroupBase<Option_1>>(group: Group_1) => string;
|
|
534
|
-
getOptionLabel: <Option_1>(option: Option_1) => string;
|
|
535
|
-
getOptionValue: <Option_1>(option: Option_1) => string;
|
|
536
|
-
isDisabled: boolean;
|
|
537
|
-
isLoading: boolean;
|
|
538
|
-
isMulti: boolean;
|
|
539
|
-
isRtl: boolean;
|
|
540
|
-
isSearchable: boolean;
|
|
541
|
-
isOptionDisabled: <Option_1>(option: Option_1) => boolean;
|
|
542
|
-
loadingMessage: () => string;
|
|
543
|
-
maxMenuHeight: number;
|
|
544
|
-
minMenuHeight: number;
|
|
545
|
-
menuIsOpen: boolean;
|
|
546
|
-
menuPlacement: string;
|
|
547
|
-
menuPosition: string;
|
|
548
|
-
menuShouldBlockScroll: boolean;
|
|
549
|
-
menuShouldScrollIntoView: boolean;
|
|
550
|
-
noOptionsMessage: () => string;
|
|
551
|
-
openMenuOnFocus: boolean;
|
|
552
|
-
openMenuOnClick: boolean;
|
|
553
|
-
shouldPreventEscapePropagation: boolean;
|
|
554
|
-
options: never[];
|
|
555
|
-
pageSize: number;
|
|
556
|
-
placeholder: string;
|
|
557
|
-
screenReaderStatus: ({ count }: {
|
|
558
|
-
count: number;
|
|
559
|
-
}) => string;
|
|
560
|
-
styles: {};
|
|
561
|
-
tabIndex: number;
|
|
562
|
-
tabSelectsValue: boolean;
|
|
563
|
-
UNSAFE_is_experimental_generic: boolean;
|
|
564
|
-
shouldKeepInputOnSelect: boolean;
|
|
565
|
-
};
|
|
479
|
+
static defaultProps: typeof defaultProps;
|
|
566
480
|
state: State<Option, IsMulti, Group>;
|
|
567
481
|
blockOptionHover: boolean;
|
|
568
482
|
isComposing: boolean;
|
|
@@ -619,49 +533,13 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
619
533
|
getFocusableOptionsWithIds: () => FocusableOptionWithId<Option>[];
|
|
620
534
|
getValue: () => Options<Option>;
|
|
621
535
|
cx: (...args: any) => string;
|
|
622
|
-
getCommonProps():
|
|
623
|
-
clearValue: () => void;
|
|
624
|
-
cx: (...args: any) => string;
|
|
625
|
-
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
626
|
-
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
627
|
-
getValue: () => Options<Option>;
|
|
628
|
-
hasValue: boolean;
|
|
629
|
-
isMulti: IsMulti;
|
|
630
|
-
isRtl: boolean;
|
|
631
|
-
options: OptionsOrGroups<Option, Group>;
|
|
632
|
-
selectOption: (newValue: Option) => void;
|
|
633
|
-
selectProps: Readonly<SelectProps<Option, IsMulti, Group>>;
|
|
634
|
-
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option) => void;
|
|
635
|
-
};
|
|
536
|
+
getCommonProps(): CommonProps<Option, IsMulti, Group>;
|
|
636
537
|
getOptionLabel: (data: Option) => string;
|
|
637
538
|
getOptionValue: (data: Option) => string;
|
|
638
539
|
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
639
540
|
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
640
541
|
getElementId: (element: "group" | "input" | "listbox" | "option" | "placeholder" | "live-region" | "multi-message" | "single-value" | "selected-value") => string;
|
|
641
|
-
getComponents: () =>
|
|
642
|
-
ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
643
|
-
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ControlProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
644
|
-
DropdownIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").DropdownIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
645
|
-
Group: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
646
|
-
GroupHeading: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupHeadingProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
647
|
-
IndicatorsContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").IndicatorsContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
648
|
-
Input: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").InputProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
649
|
-
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;
|
|
650
|
-
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;
|
|
651
|
-
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;
|
|
652
|
-
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;
|
|
653
|
-
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;
|
|
654
|
-
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;
|
|
655
|
-
MultiValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").MultiValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
656
|
-
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;
|
|
657
|
-
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;
|
|
658
|
-
MultiValueRemove: typeof import("./components/multi-value").MultiValueRemove;
|
|
659
|
-
Option: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").OptionProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
660
|
-
Placeholder: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").PlaceholderProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
661
|
-
SelectContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
662
|
-
SingleValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").SingleValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
663
|
-
ValueContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ValueContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
664
|
-
};
|
|
542
|
+
getComponents: () => ReturnType<typeof defaultComponents>;
|
|
665
543
|
buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
666
544
|
getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
667
545
|
buildFocusableOptions: () => Option[];
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -42,25 +42,5 @@ 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
|
-
|
|
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;
|
|
45
|
+
[K in keyof StylesProps<Option, IsMulti, Group>]?: (base: CSSObjectWithLabel, props: StylesProps<Option, IsMulti, Group>[K]) => CSSObjectWithLabel;
|
|
66
46
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ComponentType } from 'react';
|
|
2
2
|
import { type GroupBase } from '../types';
|
|
3
|
-
import { type ContainerProps, type IndicatorsContainerProps, type ValueContainerProps } from './containers';
|
|
4
|
-
import { type ControlProps } from './control';
|
|
5
|
-
import { type GroupHeadingProps, type GroupProps } from './group';
|
|
6
|
-
import { type ClearIndicatorProps, type DropdownIndicatorProps, type LoadingIndicatorProps } from './indicators';
|
|
7
|
-
import { type InputProps } from './input';
|
|
8
|
-
import { type MenuListProps, type MenuPortalProps, type MenuProps, type NoticeProps } from './menu';
|
|
9
|
-
import { type MultiValueGenericProps, type MultiValueProps, MultiValueRemove, type MultiValueRemoveProps } from './multi-value';
|
|
10
|
-
import { type OptionProps } from './option';
|
|
11
|
-
import { type PlaceholderProps } from './placeholder';
|
|
12
|
-
import { type SingleValueProps } from './single-value';
|
|
3
|
+
import { type ContainerProps, IndicatorsContainer, type IndicatorsContainerProps, SelectContainer, ValueContainer, type ValueContainerProps } from './containers';
|
|
4
|
+
import Control, { type ControlProps } from './control';
|
|
5
|
+
import Group, { GroupHeading, type GroupHeadingProps, type GroupProps } from './group';
|
|
6
|
+
import { ClearIndicator, type ClearIndicatorProps, DropdownIndicator, type DropdownIndicatorProps, LoadingIndicator, type LoadingIndicatorProps } from './indicators';
|
|
7
|
+
import Input, { type InputProps } from './input';
|
|
8
|
+
import Menu, { LoadingMessage, MenuList, type MenuListProps, MenuPortal, type MenuPortalProps, type MenuProps, NoOptionsMessage, type NoticeProps } from './menu';
|
|
9
|
+
import MultiValue, { MultiValueContainer, type MultiValueGenericProps, MultiValueLabel, type MultiValueProps, MultiValueRemove, type MultiValueRemoveProps } from './multi-value';
|
|
10
|
+
import Option, { type OptionProps } from './option';
|
|
11
|
+
import Placeholder, { type PlaceholderProps } from './placeholder';
|
|
12
|
+
import SingleValue, { type SingleValueProps } from './single-value';
|
|
13
13
|
export interface SelectComponents<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
14
14
|
ClearIndicator: ComponentType<ClearIndicatorProps<Option, IsMulti, Group>>;
|
|
15
15
|
Control: ComponentType<ControlProps<Option, IsMulti, Group>>;
|
|
@@ -36,28 +36,28 @@ export interface SelectComponents<Option, IsMulti extends boolean, Group extends
|
|
|
36
36
|
}
|
|
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
|
-
ClearIndicator:
|
|
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:
|
|
39
|
+
ClearIndicator: typeof ClearIndicator;
|
|
40
|
+
Control: typeof Control;
|
|
41
|
+
DropdownIndicator: typeof DropdownIndicator;
|
|
42
|
+
Group: typeof Group;
|
|
43
|
+
GroupHeading: typeof GroupHeading;
|
|
44
|
+
IndicatorsContainer: typeof IndicatorsContainer;
|
|
45
|
+
Input: typeof Input;
|
|
46
|
+
LoadingIndicator: typeof LoadingIndicator;
|
|
47
|
+
Menu: typeof Menu;
|
|
48
|
+
MenuList: typeof MenuList;
|
|
49
|
+
MenuPortal: typeof MenuPortal;
|
|
50
|
+
LoadingMessage: typeof LoadingMessage;
|
|
51
|
+
NoOptionsMessage: typeof NoOptionsMessage;
|
|
52
|
+
MultiValue: typeof MultiValue;
|
|
53
|
+
MultiValueContainer: typeof MultiValueContainer;
|
|
54
|
+
MultiValueLabel: typeof MultiValueLabel;
|
|
55
55
|
MultiValueRemove: typeof MultiValueRemove;
|
|
56
|
-
Option:
|
|
57
|
-
Placeholder:
|
|
58
|
-
SelectContainer:
|
|
59
|
-
SingleValue:
|
|
60
|
-
ValueContainer:
|
|
56
|
+
Option: typeof Option;
|
|
57
|
+
Placeholder: typeof Placeholder;
|
|
58
|
+
SelectContainer: typeof SelectContainer;
|
|
59
|
+
SingleValue: typeof SingleValue;
|
|
60
|
+
ValueContainer: typeof ValueContainer;
|
|
61
61
|
};
|
|
62
62
|
type SelectComponentsGeneric = typeof components;
|
|
63
63
|
interface ComponentsProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { type AriaAttributes, Component, type FocusEventHandler, type FormEventHandler, type KeyboardEventHandler, type MouseEventHandler, type ReactNode, type RefCallback, type TouchEventHandler } from 'react';
|
|
2
2
|
import { type AriaLiveMessages, type AriaSelection } from './accessibility';
|
|
3
|
-
import { type SelectComponentsConfig } from './components';
|
|
3
|
+
import { defaultComponents, type SelectComponentsConfig } from './components';
|
|
4
4
|
import { type FilterOptionOption } from './filters';
|
|
5
5
|
import { type ClassNamesConfig, type StylesConfig, type StylesProps } from './styles';
|
|
6
|
-
import { type ActionMeta, type FocusDirection, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SetValueAction } from './types';
|
|
6
|
+
import { type ActionMeta, type CommonProps, type FocusDirection, type GetOptionLabel, type GetOptionValue, type GroupBase, type InputActionMeta, type MenuPlacement, type MenuPosition, type OnChangeValue, type Options, type OptionsOrGroups, type PropsValue, type SetValueAction } from './types';
|
|
7
7
|
export type FormatOptionLabelContext = 'menu' | 'value';
|
|
8
8
|
export interface FormatOptionLabelMeta<Option> {
|
|
9
9
|
context: FormatOptionLabelContext;
|
|
@@ -438,50 +438,7 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
438
438
|
*/
|
|
439
439
|
shouldKeepInputOnSelect?: boolean;
|
|
440
440
|
}
|
|
441
|
-
export declare const defaultProps:
|
|
442
|
-
backspaceRemovesValue: boolean;
|
|
443
|
-
blurInputOnSelect: boolean;
|
|
444
|
-
captureMenuScroll: boolean;
|
|
445
|
-
classNames: {};
|
|
446
|
-
closeMenuOnSelect: boolean;
|
|
447
|
-
closeMenuOnScroll: boolean;
|
|
448
|
-
components: {};
|
|
449
|
-
controlShouldRenderValue: boolean;
|
|
450
|
-
escapeClearsValue: boolean;
|
|
451
|
-
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
452
|
-
formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
|
|
453
|
-
getOptionLabel: <Option>(option: Option) => string;
|
|
454
|
-
getOptionValue: <Option>(option: Option) => string;
|
|
455
|
-
isDisabled: boolean;
|
|
456
|
-
isLoading: boolean;
|
|
457
|
-
isMulti: boolean;
|
|
458
|
-
isRtl: boolean;
|
|
459
|
-
isSearchable: boolean;
|
|
460
|
-
isOptionDisabled: <Option>(option: Option) => boolean;
|
|
461
|
-
loadingMessage: () => string;
|
|
462
|
-
maxMenuHeight: number;
|
|
463
|
-
minMenuHeight: number;
|
|
464
|
-
menuIsOpen: boolean;
|
|
465
|
-
menuPlacement: string;
|
|
466
|
-
menuPosition: string;
|
|
467
|
-
menuShouldBlockScroll: boolean;
|
|
468
|
-
menuShouldScrollIntoView: boolean;
|
|
469
|
-
noOptionsMessage: () => string;
|
|
470
|
-
openMenuOnFocus: boolean;
|
|
471
|
-
openMenuOnClick: boolean;
|
|
472
|
-
shouldPreventEscapePropagation: boolean;
|
|
473
|
-
options: never[];
|
|
474
|
-
pageSize: number;
|
|
475
|
-
placeholder: string;
|
|
476
|
-
screenReaderStatus: ({ count }: {
|
|
477
|
-
count: number;
|
|
478
|
-
}) => string;
|
|
479
|
-
styles: {};
|
|
480
|
-
tabIndex: number;
|
|
481
|
-
tabSelectsValue: boolean;
|
|
482
|
-
UNSAFE_is_experimental_generic: boolean;
|
|
483
|
-
shouldKeepInputOnSelect: boolean;
|
|
484
|
-
};
|
|
441
|
+
export declare const defaultProps: Omit<SelectProps<unknown, false, GroupBase<unknown>>, 'inputValue' | 'onChange' | 'onInputChange' | 'onMenuOpen' | 'onMenuClose' | 'value' | 'appearance'>;
|
|
485
442
|
interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
486
443
|
ariaSelection: AriaSelection<Option, IsMulti> | null;
|
|
487
444
|
inputIsHidden: boolean;
|
|
@@ -519,50 +476,7 @@ interface CategorizedGroup<Option, Group extends GroupBase<Option>> {
|
|
|
519
476
|
}
|
|
520
477
|
type CategorizedGroupOrOption<Option, Group extends GroupBase<Option>> = CategorizedGroup<Option, Group> | CategorizedOption<Option>;
|
|
521
478
|
export default class Select<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Component<SelectProps<Option, IsMulti, Group>, State<Option, IsMulti, Group>> {
|
|
522
|
-
static defaultProps:
|
|
523
|
-
backspaceRemovesValue: boolean;
|
|
524
|
-
blurInputOnSelect: boolean;
|
|
525
|
-
captureMenuScroll: boolean;
|
|
526
|
-
classNames: {};
|
|
527
|
-
closeMenuOnSelect: boolean;
|
|
528
|
-
closeMenuOnScroll: boolean;
|
|
529
|
-
components: {};
|
|
530
|
-
controlShouldRenderValue: boolean;
|
|
531
|
-
escapeClearsValue: boolean;
|
|
532
|
-
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
|
|
533
|
-
formatGroupLabel: <Option_1, Group_1 extends GroupBase<Option_1>>(group: Group_1) => string;
|
|
534
|
-
getOptionLabel: <Option_1>(option: Option_1) => string;
|
|
535
|
-
getOptionValue: <Option_1>(option: Option_1) => string;
|
|
536
|
-
isDisabled: boolean;
|
|
537
|
-
isLoading: boolean;
|
|
538
|
-
isMulti: boolean;
|
|
539
|
-
isRtl: boolean;
|
|
540
|
-
isSearchable: boolean;
|
|
541
|
-
isOptionDisabled: <Option_1>(option: Option_1) => boolean;
|
|
542
|
-
loadingMessage: () => string;
|
|
543
|
-
maxMenuHeight: number;
|
|
544
|
-
minMenuHeight: number;
|
|
545
|
-
menuIsOpen: boolean;
|
|
546
|
-
menuPlacement: string;
|
|
547
|
-
menuPosition: string;
|
|
548
|
-
menuShouldBlockScroll: boolean;
|
|
549
|
-
menuShouldScrollIntoView: boolean;
|
|
550
|
-
noOptionsMessage: () => string;
|
|
551
|
-
openMenuOnFocus: boolean;
|
|
552
|
-
openMenuOnClick: boolean;
|
|
553
|
-
shouldPreventEscapePropagation: boolean;
|
|
554
|
-
options: never[];
|
|
555
|
-
pageSize: number;
|
|
556
|
-
placeholder: string;
|
|
557
|
-
screenReaderStatus: ({ count }: {
|
|
558
|
-
count: number;
|
|
559
|
-
}) => string;
|
|
560
|
-
styles: {};
|
|
561
|
-
tabIndex: number;
|
|
562
|
-
tabSelectsValue: boolean;
|
|
563
|
-
UNSAFE_is_experimental_generic: boolean;
|
|
564
|
-
shouldKeepInputOnSelect: boolean;
|
|
565
|
-
};
|
|
479
|
+
static defaultProps: typeof defaultProps;
|
|
566
480
|
state: State<Option, IsMulti, Group>;
|
|
567
481
|
blockOptionHover: boolean;
|
|
568
482
|
isComposing: boolean;
|
|
@@ -619,49 +533,13 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
619
533
|
getFocusableOptionsWithIds: () => FocusableOptionWithId<Option>[];
|
|
620
534
|
getValue: () => Options<Option>;
|
|
621
535
|
cx: (...args: any) => string;
|
|
622
|
-
getCommonProps():
|
|
623
|
-
clearValue: () => void;
|
|
624
|
-
cx: (...args: any) => string;
|
|
625
|
-
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
626
|
-
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
627
|
-
getValue: () => Options<Option>;
|
|
628
|
-
hasValue: boolean;
|
|
629
|
-
isMulti: IsMulti;
|
|
630
|
-
isRtl: boolean;
|
|
631
|
-
options: OptionsOrGroups<Option, Group>;
|
|
632
|
-
selectOption: (newValue: Option) => void;
|
|
633
|
-
selectProps: Readonly<SelectProps<Option, IsMulti, Group>>;
|
|
634
|
-
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option) => void;
|
|
635
|
-
};
|
|
536
|
+
getCommonProps(): CommonProps<Option, IsMulti, Group>;
|
|
636
537
|
getOptionLabel: (data: Option) => string;
|
|
637
538
|
getOptionValue: (data: Option) => string;
|
|
638
539
|
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => any;
|
|
639
540
|
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
|
|
640
541
|
getElementId: (element: "group" | "input" | "listbox" | "option" | "placeholder" | "live-region" | "multi-message" | "single-value" | "selected-value") => string;
|
|
641
|
-
getComponents: () =>
|
|
642
|
-
ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
643
|
-
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ControlProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
644
|
-
DropdownIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").DropdownIndicatorProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
645
|
-
Group: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
646
|
-
GroupHeading: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").GroupHeadingProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
647
|
-
IndicatorsContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").IndicatorsContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
648
|
-
Input: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").InputProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
649
|
-
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;
|
|
650
|
-
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;
|
|
651
|
-
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;
|
|
652
|
-
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;
|
|
653
|
-
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;
|
|
654
|
-
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;
|
|
655
|
-
MultiValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").MultiValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
656
|
-
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;
|
|
657
|
-
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;
|
|
658
|
-
MultiValueRemove: typeof import("./components/multi-value").MultiValueRemove;
|
|
659
|
-
Option: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").OptionProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
660
|
-
Placeholder: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").PlaceholderProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
661
|
-
SelectContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
662
|
-
SingleValue: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").SingleValueProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
663
|
-
ValueContainer: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ValueContainerProps<Option_1, IsMulti_1, Group_1>) => JSX.Element;
|
|
664
|
-
};
|
|
542
|
+
getComponents: () => ReturnType<typeof defaultComponents>;
|
|
665
543
|
buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
666
544
|
getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
|
|
667
545
|
buildFocusableOptions: () => Option[];
|
|
@@ -42,25 +42,5 @@ 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
|
-
|
|
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;
|
|
45
|
+
[K in keyof StylesProps<Option, IsMulti, Group>]?: (base: CSSObjectWithLabel, props: StylesProps<Option, IsMulti, Group>[K]) => CSSObjectWithLabel;
|
|
66
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-select",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"atlaskit:src": "src/index.tsx",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/ds-lib": "^5.1.0",
|
|
24
|
-
"@atlaskit/icon": "^28.
|
|
24
|
+
"@atlaskit/icon": "^28.4.0",
|
|
25
25
|
"@atlaskit/layering": "^3.0.0",
|
|
26
26
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
27
27
|
"@atlaskit/primitives": "^14.15.0",
|