@atlaskit/react-select 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/select.js +77 -80
- package/dist/es2019/select.js +3 -5
- package/dist/esm/select.js +77 -80
- package/dist/types/select.d.ts +0 -6
- package/dist/types-ts4.5/select.d.ts +0 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 2.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#161448](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161448)
|
|
8
|
+
[`7926a078306bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7926a078306bf) -
|
|
9
|
+
Update accessibility for description
|
|
10
|
+
|
|
3
11
|
## 2.6.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/select.js
CHANGED
|
@@ -81,8 +81,7 @@ var defaultProps = exports.defaultProps = {
|
|
|
81
81
|
styles: {},
|
|
82
82
|
tabIndex: 0,
|
|
83
83
|
tabSelectsValue: true,
|
|
84
|
-
UNSAFE_is_experimental_generic: false
|
|
85
|
-
shouldOmitDefaultDescription: false
|
|
84
|
+
UNSAFE_is_experimental_generic: false
|
|
86
85
|
};
|
|
87
86
|
function toCategorizedOption(props, option, selectValue, index) {
|
|
88
87
|
var isDisabled = _isOptionDisabled(props, option, selectValue);
|
|
@@ -1162,9 +1161,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1162
1161
|
key: "calculateDescription",
|
|
1163
1162
|
value: function calculateDescription(action) {
|
|
1164
1163
|
var descriptionProp = this.props['aria-describedby'] || this.props['descriptionId'];
|
|
1165
|
-
var
|
|
1166
|
-
isMulti = _this$props8.isMulti,
|
|
1167
|
-
shouldOmitDefaultDescription = _this$props8.shouldOmitDefaultDescription;
|
|
1164
|
+
var isMulti = this.props.isMulti;
|
|
1168
1165
|
var selectValue = this.state.selectValue;
|
|
1169
1166
|
var defaultDescription = selectValue.length ? this.getElementId('live-region') : this.getElementId('placeholder');
|
|
1170
1167
|
if (!isMulti && selectValue.length && action !== 'initial-input-focus') {
|
|
@@ -1173,7 +1170,7 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1173
1170
|
if (isMulti) {
|
|
1174
1171
|
var multiMessage = this.getElementId('multi-message');
|
|
1175
1172
|
return {
|
|
1176
|
-
'aria-describedby': [descriptionProp,
|
|
1173
|
+
'aria-describedby': descriptionProp ? [descriptionProp, defaultDescription, multiMessage].join(' ') : [defaultDescription, multiMessage].join(' ')
|
|
1177
1174
|
};
|
|
1178
1175
|
} else {
|
|
1179
1176
|
return {
|
|
@@ -1242,22 +1239,22 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1242
1239
|
// Renderers
|
|
1243
1240
|
// ==============================
|
|
1244
1241
|
function renderInput() {
|
|
1245
|
-
var _this$
|
|
1246
|
-
descriptionId = _this$
|
|
1247
|
-
form = _this$
|
|
1248
|
-
inputId = _this$
|
|
1249
|
-
inputValue = _this$
|
|
1250
|
-
isDisabled = _this$
|
|
1251
|
-
isInvalid = _this$
|
|
1252
|
-
isRequired = _this$
|
|
1253
|
-
isSearchable = _this$
|
|
1254
|
-
label = _this$
|
|
1255
|
-
labelId = _this$
|
|
1256
|
-
menuIsOpen = _this$
|
|
1257
|
-
required = _this$
|
|
1258
|
-
_this$
|
|
1259
|
-
tabIndex = _this$
|
|
1260
|
-
testId = _this$
|
|
1242
|
+
var _this$props8 = this.props,
|
|
1243
|
+
descriptionId = _this$props8.descriptionId,
|
|
1244
|
+
form = _this$props8.form,
|
|
1245
|
+
inputId = _this$props8.inputId,
|
|
1246
|
+
inputValue = _this$props8.inputValue,
|
|
1247
|
+
isDisabled = _this$props8.isDisabled,
|
|
1248
|
+
isInvalid = _this$props8.isInvalid,
|
|
1249
|
+
isRequired = _this$props8.isRequired,
|
|
1250
|
+
isSearchable = _this$props8.isSearchable,
|
|
1251
|
+
label = _this$props8.label,
|
|
1252
|
+
labelId = _this$props8.labelId,
|
|
1253
|
+
menuIsOpen = _this$props8.menuIsOpen,
|
|
1254
|
+
required = _this$props8.required,
|
|
1255
|
+
_this$props8$tabIndex = _this$props8.tabIndex,
|
|
1256
|
+
tabIndex = _this$props8$tabIndex === void 0 ? 0 : _this$props8$tabIndex,
|
|
1257
|
+
testId = _this$props8.testId;
|
|
1261
1258
|
var _this$getComponents = this.getComponents(),
|
|
1262
1259
|
Input = _this$getComponents.Input;
|
|
1263
1260
|
var _this$state4 = this.state,
|
|
@@ -1332,13 +1329,13 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1332
1329
|
SingleValue = _this$getComponents2.SingleValue,
|
|
1333
1330
|
Placeholder = _this$getComponents2.Placeholder;
|
|
1334
1331
|
var commonProps = this.commonProps;
|
|
1335
|
-
var _this$
|
|
1336
|
-
controlShouldRenderValue = _this$
|
|
1337
|
-
isDisabled = _this$
|
|
1338
|
-
isMulti = _this$
|
|
1339
|
-
inputValue = _this$
|
|
1340
|
-
placeholder = _this$
|
|
1341
|
-
testId = _this$
|
|
1332
|
+
var _this$props9 = this.props,
|
|
1333
|
+
controlShouldRenderValue = _this$props9.controlShouldRenderValue,
|
|
1334
|
+
isDisabled = _this$props9.isDisabled,
|
|
1335
|
+
isMulti = _this$props9.isMulti,
|
|
1336
|
+
inputValue = _this$props9.inputValue,
|
|
1337
|
+
placeholder = _this$props9.placeholder,
|
|
1338
|
+
testId = _this$props9.testId;
|
|
1342
1339
|
var _this$state5 = this.state,
|
|
1343
1340
|
selectValue = _this$state5.selectValue,
|
|
1344
1341
|
focusedValue = _this$state5.focusedValue,
|
|
@@ -1408,12 +1405,12 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1408
1405
|
var _this$getComponents3 = this.getComponents(),
|
|
1409
1406
|
ClearIndicator = _this$getComponents3.ClearIndicator;
|
|
1410
1407
|
var commonProps = this.commonProps;
|
|
1411
|
-
var _this$
|
|
1412
|
-
clearControlLabel = _this$
|
|
1413
|
-
isDisabled = _this$
|
|
1414
|
-
isLoading = _this$
|
|
1415
|
-
spacing = _this$
|
|
1416
|
-
testId = _this$
|
|
1408
|
+
var _this$props10 = this.props,
|
|
1409
|
+
clearControlLabel = _this$props10.clearControlLabel,
|
|
1410
|
+
isDisabled = _this$props10.isDisabled,
|
|
1411
|
+
isLoading = _this$props10.isLoading,
|
|
1412
|
+
spacing = _this$props10.spacing,
|
|
1413
|
+
testId = _this$props10.testId;
|
|
1417
1414
|
var isFocused = this.state.isFocused;
|
|
1418
1415
|
if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
|
|
1419
1416
|
return null;
|
|
@@ -1439,11 +1436,11 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1439
1436
|
var _this$getComponents4 = this.getComponents(),
|
|
1440
1437
|
LoadingIndicator = _this$getComponents4.LoadingIndicator;
|
|
1441
1438
|
var commonProps = this.commonProps;
|
|
1442
|
-
var _this$
|
|
1443
|
-
isDisabled = _this$
|
|
1444
|
-
isLoading = _this$
|
|
1445
|
-
spacing = _this$
|
|
1446
|
-
testId = _this$
|
|
1439
|
+
var _this$props11 = this.props,
|
|
1440
|
+
isDisabled = _this$props11.isDisabled,
|
|
1441
|
+
isLoading = _this$props11.isLoading,
|
|
1442
|
+
spacing = _this$props11.spacing,
|
|
1443
|
+
testId = _this$props11.testId;
|
|
1447
1444
|
var isFocused = this.state.isFocused;
|
|
1448
1445
|
if (!LoadingIndicator || !isLoading) {
|
|
1449
1446
|
return null;
|
|
@@ -1470,10 +1467,10 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1470
1467
|
return null;
|
|
1471
1468
|
}
|
|
1472
1469
|
var commonProps = this.commonProps;
|
|
1473
|
-
var _this$
|
|
1474
|
-
isDisabled = _this$
|
|
1475
|
-
spacing = _this$
|
|
1476
|
-
testId = _this$
|
|
1470
|
+
var _this$props12 = this.props,
|
|
1471
|
+
isDisabled = _this$props12.isDisabled,
|
|
1472
|
+
spacing = _this$props12.spacing,
|
|
1473
|
+
testId = _this$props12.testId;
|
|
1477
1474
|
var isFocused = this.state.isFocused;
|
|
1478
1475
|
var isCompact = spacing === 'compact';
|
|
1479
1476
|
var innerProps = _objectSpread({
|
|
@@ -1505,25 +1502,25 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1505
1502
|
Option = _this$getComponents6.Option;
|
|
1506
1503
|
var commonProps = this.commonProps;
|
|
1507
1504
|
var focusedOption = this.state.focusedOption;
|
|
1508
|
-
var _this$
|
|
1509
|
-
captureMenuScroll = _this$
|
|
1510
|
-
inputValue = _this$
|
|
1511
|
-
isLoading = _this$
|
|
1512
|
-
loadingMessage = _this$
|
|
1513
|
-
minMenuHeight = _this$
|
|
1514
|
-
maxMenuHeight = _this$
|
|
1515
|
-
menuIsOpen = _this$
|
|
1516
|
-
menuPlacement = _this$
|
|
1517
|
-
menuPosition = _this$
|
|
1518
|
-
menuPortalTarget = _this$
|
|
1519
|
-
menuShouldBlockScroll = _this$
|
|
1520
|
-
menuShouldScrollIntoView = _this$
|
|
1521
|
-
noOptionsMessage = _this$
|
|
1522
|
-
onMenuScrollToTop = _this$
|
|
1523
|
-
onMenuScrollToBottom = _this$
|
|
1524
|
-
labelId = _this$
|
|
1525
|
-
label = _this$
|
|
1526
|
-
testId = _this$
|
|
1505
|
+
var _this$props13 = this.props,
|
|
1506
|
+
captureMenuScroll = _this$props13.captureMenuScroll,
|
|
1507
|
+
inputValue = _this$props13.inputValue,
|
|
1508
|
+
isLoading = _this$props13.isLoading,
|
|
1509
|
+
loadingMessage = _this$props13.loadingMessage,
|
|
1510
|
+
minMenuHeight = _this$props13.minMenuHeight,
|
|
1511
|
+
maxMenuHeight = _this$props13.maxMenuHeight,
|
|
1512
|
+
menuIsOpen = _this$props13.menuIsOpen,
|
|
1513
|
+
menuPlacement = _this$props13.menuPlacement,
|
|
1514
|
+
menuPosition = _this$props13.menuPosition,
|
|
1515
|
+
menuPortalTarget = _this$props13.menuPortalTarget,
|
|
1516
|
+
menuShouldBlockScroll = _this$props13.menuShouldBlockScroll,
|
|
1517
|
+
menuShouldScrollIntoView = _this$props13.menuShouldScrollIntoView,
|
|
1518
|
+
noOptionsMessage = _this$props13.noOptionsMessage,
|
|
1519
|
+
onMenuScrollToTop = _this$props13.onMenuScrollToTop,
|
|
1520
|
+
onMenuScrollToBottom = _this$props13.onMenuScrollToBottom,
|
|
1521
|
+
labelId = _this$props13.labelId,
|
|
1522
|
+
label = _this$props13.label,
|
|
1523
|
+
testId = _this$props13.testId;
|
|
1527
1524
|
if (!menuIsOpen) {
|
|
1528
1525
|
return null;
|
|
1529
1526
|
}
|
|
@@ -1705,12 +1702,12 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1705
1702
|
key: "renderFormField",
|
|
1706
1703
|
value: function renderFormField() {
|
|
1707
1704
|
var _this5 = this;
|
|
1708
|
-
var _this$
|
|
1709
|
-
delimiter = _this$
|
|
1710
|
-
isDisabled = _this$
|
|
1711
|
-
isMulti = _this$
|
|
1712
|
-
required = _this$
|
|
1713
|
-
name = _this$
|
|
1705
|
+
var _this$props14 = this.props,
|
|
1706
|
+
delimiter = _this$props14.delimiter,
|
|
1707
|
+
isDisabled = _this$props14.isDisabled,
|
|
1708
|
+
isMulti = _this$props14.isMulti,
|
|
1709
|
+
required = _this$props14.required,
|
|
1710
|
+
name = _this$props14.name;
|
|
1714
1711
|
var selectValue = this.state.selectValue;
|
|
1715
1712
|
if (required && !this.hasValue() && !isDisabled) {
|
|
1716
1713
|
return /*#__PURE__*/_react.default.createElement(_internal.RequiredInput, {
|
|
@@ -1797,17 +1794,17 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
1797
1794
|
IndicatorsContainer = _this$getComponents7.IndicatorsContainer,
|
|
1798
1795
|
SelectContainer = _this$getComponents7.SelectContainer,
|
|
1799
1796
|
ValueContainer = _this$getComponents7.ValueContainer;
|
|
1800
|
-
var _this$
|
|
1801
|
-
className = _this$
|
|
1802
|
-
id = _this$
|
|
1803
|
-
isDisabled = _this$
|
|
1804
|
-
menuIsOpen = _this$
|
|
1805
|
-
isInvalid = _this$
|
|
1806
|
-
testId = _this$
|
|
1807
|
-
_this$
|
|
1808
|
-
appearance = _this$
|
|
1809
|
-
_this$
|
|
1810
|
-
spacing = _this$
|
|
1797
|
+
var _this$props15 = this.props,
|
|
1798
|
+
className = _this$props15.className,
|
|
1799
|
+
id = _this$props15.id,
|
|
1800
|
+
isDisabled = _this$props15.isDisabled,
|
|
1801
|
+
menuIsOpen = _this$props15.menuIsOpen,
|
|
1802
|
+
isInvalid = _this$props15.isInvalid,
|
|
1803
|
+
testId = _this$props15.testId,
|
|
1804
|
+
_this$props15$appeara = _this$props15.appearance,
|
|
1805
|
+
appearance = _this$props15$appeara === void 0 ? 'default' : _this$props15$appeara,
|
|
1806
|
+
_this$props15$spacing = _this$props15.spacing,
|
|
1807
|
+
spacing = _this$props15$spacing === void 0 ? 'default' : _this$props15$spacing;
|
|
1811
1808
|
var isFocused = this.state.isFocused;
|
|
1812
1809
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
1813
1810
|
var isCompact = spacing === 'compact';
|
package/dist/es2019/select.js
CHANGED
|
@@ -56,8 +56,7 @@ export const defaultProps = {
|
|
|
56
56
|
styles: {},
|
|
57
57
|
tabIndex: 0,
|
|
58
58
|
tabSelectsValue: true,
|
|
59
|
-
UNSAFE_is_experimental_generic: false
|
|
60
|
-
shouldOmitDefaultDescription: false
|
|
59
|
+
UNSAFE_is_experimental_generic: false
|
|
61
60
|
};
|
|
62
61
|
function toCategorizedOption(props, option, selectValue, index) {
|
|
63
62
|
const isDisabled = isOptionDisabled(props, option, selectValue);
|
|
@@ -1178,8 +1177,7 @@ export default class Select extends Component {
|
|
|
1178
1177
|
calculateDescription(action) {
|
|
1179
1178
|
const descriptionProp = this.props['aria-describedby'] || this.props['descriptionId'];
|
|
1180
1179
|
const {
|
|
1181
|
-
isMulti
|
|
1182
|
-
shouldOmitDefaultDescription
|
|
1180
|
+
isMulti
|
|
1183
1181
|
} = this.props;
|
|
1184
1182
|
const {
|
|
1185
1183
|
selectValue
|
|
@@ -1191,7 +1189,7 @@ export default class Select extends Component {
|
|
|
1191
1189
|
if (isMulti) {
|
|
1192
1190
|
const multiMessage = this.getElementId('multi-message');
|
|
1193
1191
|
return {
|
|
1194
|
-
'aria-describedby': [descriptionProp,
|
|
1192
|
+
'aria-describedby': descriptionProp ? [descriptionProp, defaultDescription, multiMessage].join(' ') : [defaultDescription, multiMessage].join(' ')
|
|
1195
1193
|
};
|
|
1196
1194
|
} else {
|
|
1197
1195
|
return {
|
package/dist/esm/select.js
CHANGED
|
@@ -72,8 +72,7 @@ export var defaultProps = {
|
|
|
72
72
|
styles: {},
|
|
73
73
|
tabIndex: 0,
|
|
74
74
|
tabSelectsValue: true,
|
|
75
|
-
UNSAFE_is_experimental_generic: false
|
|
76
|
-
shouldOmitDefaultDescription: false
|
|
75
|
+
UNSAFE_is_experimental_generic: false
|
|
77
76
|
};
|
|
78
77
|
function toCategorizedOption(props, option, selectValue, index) {
|
|
79
78
|
var isDisabled = _isOptionDisabled(props, option, selectValue);
|
|
@@ -1153,9 +1152,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1153
1152
|
key: "calculateDescription",
|
|
1154
1153
|
value: function calculateDescription(action) {
|
|
1155
1154
|
var descriptionProp = this.props['aria-describedby'] || this.props['descriptionId'];
|
|
1156
|
-
var
|
|
1157
|
-
isMulti = _this$props8.isMulti,
|
|
1158
|
-
shouldOmitDefaultDescription = _this$props8.shouldOmitDefaultDescription;
|
|
1155
|
+
var isMulti = this.props.isMulti;
|
|
1159
1156
|
var selectValue = this.state.selectValue;
|
|
1160
1157
|
var defaultDescription = selectValue.length ? this.getElementId('live-region') : this.getElementId('placeholder');
|
|
1161
1158
|
if (!isMulti && selectValue.length && action !== 'initial-input-focus') {
|
|
@@ -1164,7 +1161,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1164
1161
|
if (isMulti) {
|
|
1165
1162
|
var multiMessage = this.getElementId('multi-message');
|
|
1166
1163
|
return {
|
|
1167
|
-
'aria-describedby': [descriptionProp,
|
|
1164
|
+
'aria-describedby': descriptionProp ? [descriptionProp, defaultDescription, multiMessage].join(' ') : [defaultDescription, multiMessage].join(' ')
|
|
1168
1165
|
};
|
|
1169
1166
|
} else {
|
|
1170
1167
|
return {
|
|
@@ -1233,22 +1230,22 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1233
1230
|
// Renderers
|
|
1234
1231
|
// ==============================
|
|
1235
1232
|
function renderInput() {
|
|
1236
|
-
var _this$
|
|
1237
|
-
descriptionId = _this$
|
|
1238
|
-
form = _this$
|
|
1239
|
-
inputId = _this$
|
|
1240
|
-
inputValue = _this$
|
|
1241
|
-
isDisabled = _this$
|
|
1242
|
-
isInvalid = _this$
|
|
1243
|
-
isRequired = _this$
|
|
1244
|
-
isSearchable = _this$
|
|
1245
|
-
label = _this$
|
|
1246
|
-
labelId = _this$
|
|
1247
|
-
menuIsOpen = _this$
|
|
1248
|
-
required = _this$
|
|
1249
|
-
_this$
|
|
1250
|
-
tabIndex = _this$
|
|
1251
|
-
testId = _this$
|
|
1233
|
+
var _this$props8 = this.props,
|
|
1234
|
+
descriptionId = _this$props8.descriptionId,
|
|
1235
|
+
form = _this$props8.form,
|
|
1236
|
+
inputId = _this$props8.inputId,
|
|
1237
|
+
inputValue = _this$props8.inputValue,
|
|
1238
|
+
isDisabled = _this$props8.isDisabled,
|
|
1239
|
+
isInvalid = _this$props8.isInvalid,
|
|
1240
|
+
isRequired = _this$props8.isRequired,
|
|
1241
|
+
isSearchable = _this$props8.isSearchable,
|
|
1242
|
+
label = _this$props8.label,
|
|
1243
|
+
labelId = _this$props8.labelId,
|
|
1244
|
+
menuIsOpen = _this$props8.menuIsOpen,
|
|
1245
|
+
required = _this$props8.required,
|
|
1246
|
+
_this$props8$tabIndex = _this$props8.tabIndex,
|
|
1247
|
+
tabIndex = _this$props8$tabIndex === void 0 ? 0 : _this$props8$tabIndex,
|
|
1248
|
+
testId = _this$props8.testId;
|
|
1252
1249
|
var _this$getComponents = this.getComponents(),
|
|
1253
1250
|
Input = _this$getComponents.Input;
|
|
1254
1251
|
var _this$state4 = this.state,
|
|
@@ -1323,13 +1320,13 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1323
1320
|
SingleValue = _this$getComponents2.SingleValue,
|
|
1324
1321
|
Placeholder = _this$getComponents2.Placeholder;
|
|
1325
1322
|
var commonProps = this.commonProps;
|
|
1326
|
-
var _this$
|
|
1327
|
-
controlShouldRenderValue = _this$
|
|
1328
|
-
isDisabled = _this$
|
|
1329
|
-
isMulti = _this$
|
|
1330
|
-
inputValue = _this$
|
|
1331
|
-
placeholder = _this$
|
|
1332
|
-
testId = _this$
|
|
1323
|
+
var _this$props9 = this.props,
|
|
1324
|
+
controlShouldRenderValue = _this$props9.controlShouldRenderValue,
|
|
1325
|
+
isDisabled = _this$props9.isDisabled,
|
|
1326
|
+
isMulti = _this$props9.isMulti,
|
|
1327
|
+
inputValue = _this$props9.inputValue,
|
|
1328
|
+
placeholder = _this$props9.placeholder,
|
|
1329
|
+
testId = _this$props9.testId;
|
|
1333
1330
|
var _this$state5 = this.state,
|
|
1334
1331
|
selectValue = _this$state5.selectValue,
|
|
1335
1332
|
focusedValue = _this$state5.focusedValue,
|
|
@@ -1399,12 +1396,12 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1399
1396
|
var _this$getComponents3 = this.getComponents(),
|
|
1400
1397
|
ClearIndicator = _this$getComponents3.ClearIndicator;
|
|
1401
1398
|
var commonProps = this.commonProps;
|
|
1402
|
-
var _this$
|
|
1403
|
-
clearControlLabel = _this$
|
|
1404
|
-
isDisabled = _this$
|
|
1405
|
-
isLoading = _this$
|
|
1406
|
-
spacing = _this$
|
|
1407
|
-
testId = _this$
|
|
1399
|
+
var _this$props10 = this.props,
|
|
1400
|
+
clearControlLabel = _this$props10.clearControlLabel,
|
|
1401
|
+
isDisabled = _this$props10.isDisabled,
|
|
1402
|
+
isLoading = _this$props10.isLoading,
|
|
1403
|
+
spacing = _this$props10.spacing,
|
|
1404
|
+
testId = _this$props10.testId;
|
|
1408
1405
|
var isFocused = this.state.isFocused;
|
|
1409
1406
|
if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
|
|
1410
1407
|
return null;
|
|
@@ -1430,11 +1427,11 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1430
1427
|
var _this$getComponents4 = this.getComponents(),
|
|
1431
1428
|
LoadingIndicator = _this$getComponents4.LoadingIndicator;
|
|
1432
1429
|
var commonProps = this.commonProps;
|
|
1433
|
-
var _this$
|
|
1434
|
-
isDisabled = _this$
|
|
1435
|
-
isLoading = _this$
|
|
1436
|
-
spacing = _this$
|
|
1437
|
-
testId = _this$
|
|
1430
|
+
var _this$props11 = this.props,
|
|
1431
|
+
isDisabled = _this$props11.isDisabled,
|
|
1432
|
+
isLoading = _this$props11.isLoading,
|
|
1433
|
+
spacing = _this$props11.spacing,
|
|
1434
|
+
testId = _this$props11.testId;
|
|
1438
1435
|
var isFocused = this.state.isFocused;
|
|
1439
1436
|
if (!LoadingIndicator || !isLoading) {
|
|
1440
1437
|
return null;
|
|
@@ -1461,10 +1458,10 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1461
1458
|
return null;
|
|
1462
1459
|
}
|
|
1463
1460
|
var commonProps = this.commonProps;
|
|
1464
|
-
var _this$
|
|
1465
|
-
isDisabled = _this$
|
|
1466
|
-
spacing = _this$
|
|
1467
|
-
testId = _this$
|
|
1461
|
+
var _this$props12 = this.props,
|
|
1462
|
+
isDisabled = _this$props12.isDisabled,
|
|
1463
|
+
spacing = _this$props12.spacing,
|
|
1464
|
+
testId = _this$props12.testId;
|
|
1468
1465
|
var isFocused = this.state.isFocused;
|
|
1469
1466
|
var isCompact = spacing === 'compact';
|
|
1470
1467
|
var innerProps = _objectSpread({
|
|
@@ -1496,25 +1493,25 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1496
1493
|
Option = _this$getComponents6.Option;
|
|
1497
1494
|
var commonProps = this.commonProps;
|
|
1498
1495
|
var focusedOption = this.state.focusedOption;
|
|
1499
|
-
var _this$
|
|
1500
|
-
captureMenuScroll = _this$
|
|
1501
|
-
inputValue = _this$
|
|
1502
|
-
isLoading = _this$
|
|
1503
|
-
loadingMessage = _this$
|
|
1504
|
-
minMenuHeight = _this$
|
|
1505
|
-
maxMenuHeight = _this$
|
|
1506
|
-
menuIsOpen = _this$
|
|
1507
|
-
menuPlacement = _this$
|
|
1508
|
-
menuPosition = _this$
|
|
1509
|
-
menuPortalTarget = _this$
|
|
1510
|
-
menuShouldBlockScroll = _this$
|
|
1511
|
-
menuShouldScrollIntoView = _this$
|
|
1512
|
-
noOptionsMessage = _this$
|
|
1513
|
-
onMenuScrollToTop = _this$
|
|
1514
|
-
onMenuScrollToBottom = _this$
|
|
1515
|
-
labelId = _this$
|
|
1516
|
-
label = _this$
|
|
1517
|
-
testId = _this$
|
|
1496
|
+
var _this$props13 = this.props,
|
|
1497
|
+
captureMenuScroll = _this$props13.captureMenuScroll,
|
|
1498
|
+
inputValue = _this$props13.inputValue,
|
|
1499
|
+
isLoading = _this$props13.isLoading,
|
|
1500
|
+
loadingMessage = _this$props13.loadingMessage,
|
|
1501
|
+
minMenuHeight = _this$props13.minMenuHeight,
|
|
1502
|
+
maxMenuHeight = _this$props13.maxMenuHeight,
|
|
1503
|
+
menuIsOpen = _this$props13.menuIsOpen,
|
|
1504
|
+
menuPlacement = _this$props13.menuPlacement,
|
|
1505
|
+
menuPosition = _this$props13.menuPosition,
|
|
1506
|
+
menuPortalTarget = _this$props13.menuPortalTarget,
|
|
1507
|
+
menuShouldBlockScroll = _this$props13.menuShouldBlockScroll,
|
|
1508
|
+
menuShouldScrollIntoView = _this$props13.menuShouldScrollIntoView,
|
|
1509
|
+
noOptionsMessage = _this$props13.noOptionsMessage,
|
|
1510
|
+
onMenuScrollToTop = _this$props13.onMenuScrollToTop,
|
|
1511
|
+
onMenuScrollToBottom = _this$props13.onMenuScrollToBottom,
|
|
1512
|
+
labelId = _this$props13.labelId,
|
|
1513
|
+
label = _this$props13.label,
|
|
1514
|
+
testId = _this$props13.testId;
|
|
1518
1515
|
if (!menuIsOpen) {
|
|
1519
1516
|
return null;
|
|
1520
1517
|
}
|
|
@@ -1696,12 +1693,12 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1696
1693
|
key: "renderFormField",
|
|
1697
1694
|
value: function renderFormField() {
|
|
1698
1695
|
var _this5 = this;
|
|
1699
|
-
var _this$
|
|
1700
|
-
delimiter = _this$
|
|
1701
|
-
isDisabled = _this$
|
|
1702
|
-
isMulti = _this$
|
|
1703
|
-
required = _this$
|
|
1704
|
-
name = _this$
|
|
1696
|
+
var _this$props14 = this.props,
|
|
1697
|
+
delimiter = _this$props14.delimiter,
|
|
1698
|
+
isDisabled = _this$props14.isDisabled,
|
|
1699
|
+
isMulti = _this$props14.isMulti,
|
|
1700
|
+
required = _this$props14.required,
|
|
1701
|
+
name = _this$props14.name;
|
|
1705
1702
|
var selectValue = this.state.selectValue;
|
|
1706
1703
|
if (required && !this.hasValue() && !isDisabled) {
|
|
1707
1704
|
return /*#__PURE__*/React.createElement(RequiredInput, {
|
|
@@ -1788,17 +1785,17 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
1788
1785
|
IndicatorsContainer = _this$getComponents7.IndicatorsContainer,
|
|
1789
1786
|
SelectContainer = _this$getComponents7.SelectContainer,
|
|
1790
1787
|
ValueContainer = _this$getComponents7.ValueContainer;
|
|
1791
|
-
var _this$
|
|
1792
|
-
className = _this$
|
|
1793
|
-
id = _this$
|
|
1794
|
-
isDisabled = _this$
|
|
1795
|
-
menuIsOpen = _this$
|
|
1796
|
-
isInvalid = _this$
|
|
1797
|
-
testId = _this$
|
|
1798
|
-
_this$
|
|
1799
|
-
appearance = _this$
|
|
1800
|
-
_this$
|
|
1801
|
-
spacing = _this$
|
|
1788
|
+
var _this$props15 = this.props,
|
|
1789
|
+
className = _this$props15.className,
|
|
1790
|
+
id = _this$props15.id,
|
|
1791
|
+
isDisabled = _this$props15.isDisabled,
|
|
1792
|
+
menuIsOpen = _this$props15.menuIsOpen,
|
|
1793
|
+
isInvalid = _this$props15.isInvalid,
|
|
1794
|
+
testId = _this$props15.testId,
|
|
1795
|
+
_this$props15$appeara = _this$props15.appearance,
|
|
1796
|
+
appearance = _this$props15$appeara === void 0 ? 'default' : _this$props15$appeara,
|
|
1797
|
+
_this$props15$spacing = _this$props15.spacing,
|
|
1798
|
+
spacing = _this$props15$spacing === void 0 ? 'default' : _this$props15$spacing;
|
|
1802
1799
|
var isFocused = this.state.isFocused;
|
|
1803
1800
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
1804
1801
|
var isCompact = spacing === 'compact';
|
package/dist/types/select.d.ts
CHANGED
|
@@ -425,10 +425,6 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
425
425
|
appearance: 'default' | 'subtle' | 'none';
|
|
426
426
|
[key: string]: any;
|
|
427
427
|
UNSAFE_is_experimental_generic?: boolean;
|
|
428
|
-
/**
|
|
429
|
-
* omit default description being set for "aria-describedby" attribute
|
|
430
|
-
*/
|
|
431
|
-
shouldOmitDefaultDescription?: boolean;
|
|
432
428
|
}
|
|
433
429
|
export declare const defaultProps: {
|
|
434
430
|
'aria-live': string | undefined;
|
|
@@ -472,7 +468,6 @@ export declare const defaultProps: {
|
|
|
472
468
|
tabIndex: number;
|
|
473
469
|
tabSelectsValue: boolean;
|
|
474
470
|
UNSAFE_is_experimental_generic: boolean;
|
|
475
|
-
shouldOmitDefaultDescription: boolean;
|
|
476
471
|
};
|
|
477
472
|
interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
478
473
|
ariaSelection: AriaSelection<Option, IsMulti> | null;
|
|
@@ -553,7 +548,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
553
548
|
tabIndex: number;
|
|
554
549
|
tabSelectsValue: boolean;
|
|
555
550
|
UNSAFE_is_experimental_generic: boolean;
|
|
556
|
-
shouldOmitDefaultDescription: boolean;
|
|
557
551
|
};
|
|
558
552
|
state: State<Option, IsMulti, Group>;
|
|
559
553
|
blockOptionHover: boolean;
|
|
@@ -425,10 +425,6 @@ export interface SelectProps<Option, IsMulti extends boolean, Group extends Grou
|
|
|
425
425
|
appearance: 'default' | 'subtle' | 'none';
|
|
426
426
|
[key: string]: any;
|
|
427
427
|
UNSAFE_is_experimental_generic?: boolean;
|
|
428
|
-
/**
|
|
429
|
-
* omit default description being set for "aria-describedby" attribute
|
|
430
|
-
*/
|
|
431
|
-
shouldOmitDefaultDescription?: boolean;
|
|
432
428
|
}
|
|
433
429
|
export declare const defaultProps: {
|
|
434
430
|
'aria-live': string | undefined;
|
|
@@ -472,7 +468,6 @@ export declare const defaultProps: {
|
|
|
472
468
|
tabIndex: number;
|
|
473
469
|
tabSelectsValue: boolean;
|
|
474
470
|
UNSAFE_is_experimental_generic: boolean;
|
|
475
|
-
shouldOmitDefaultDescription: boolean;
|
|
476
471
|
};
|
|
477
472
|
interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
478
473
|
ariaSelection: AriaSelection<Option, IsMulti> | null;
|
|
@@ -553,7 +548,6 @@ export default class Select<Option = unknown, IsMulti extends boolean = false, G
|
|
|
553
548
|
tabIndex: number;
|
|
554
549
|
tabSelectsValue: boolean;
|
|
555
550
|
UNSAFE_is_experimental_generic: boolean;
|
|
556
|
-
shouldOmitDefaultDescription: boolean;
|
|
557
551
|
};
|
|
558
552
|
state: State<Option, IsMulti, Group>;
|
|
559
553
|
blockOptionHover: boolean;
|