carbon-react 144.7.1 → 144.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/esm/components/select/__internal__/select-list/select-list.component.js +2 -2
- package/esm/components/select/__internal__/select-textbox/select-textbox.style.js +2 -3
- package/lib/components/select/__internal__/select-list/select-list.component.js +2 -2
- package/lib/components/select/__internal__/select-textbox/select-textbox.style.js +2 -3
- package/package.json +1 -1
|
@@ -194,8 +194,8 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
|
|
|
194
194
|
},
|
|
195
195
|
"data-index": index
|
|
196
196
|
};
|
|
197
|
-
return /*#__PURE__*/React.cloneElement(child, newProps);
|
|
198
|
-
});
|
|
197
|
+
return child !== undefined ? /*#__PURE__*/React.cloneElement(child, newProps) : null;
|
|
198
|
+
}).filter(el => el !== null);
|
|
199
199
|
const lastOptionIndex = findLastIndex(childrenList, child => /*#__PURE__*/React.isValidElement(child) && (child.type === Option || child.type === OptionRow));
|
|
200
200
|
const getNextHighlightableItemIndex = useCallback((key, indexOfHighlighted) => {
|
|
201
201
|
const lastIndex = lastOptionIndex;
|
|
@@ -21,12 +21,11 @@ const StyledSelectText = styled.span`
|
|
|
21
21
|
${transparent && css`
|
|
22
22
|
font-weight: 500;
|
|
23
23
|
text-align: right;
|
|
24
|
-
flex-direction: row-reverse;
|
|
25
24
|
`}
|
|
26
25
|
|
|
27
26
|
${hasPlaceholder && css`
|
|
28
|
-
color: var(--colorsUtilityYin055);
|
|
29
|
-
font-weight: normal;
|
|
27
|
+
color: ${transparent ? `var(--colorsUtilityYin100)` : `var(--colorsUtilityYin055)`};
|
|
28
|
+
font-weight: ${transparent ? 500 : "normal"};
|
|
30
29
|
user-select: none;
|
|
31
30
|
`}
|
|
32
31
|
|
|
@@ -203,8 +203,8 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
203
203
|
},
|
|
204
204
|
"data-index": index
|
|
205
205
|
};
|
|
206
|
-
return /*#__PURE__*/_react.default.cloneElement(child, newProps);
|
|
207
|
-
});
|
|
206
|
+
return child !== undefined ? /*#__PURE__*/_react.default.cloneElement(child, newProps) : null;
|
|
207
|
+
}).filter(el => el !== null);
|
|
208
208
|
const lastOptionIndex = (0, _findLastIndex.default)(childrenList, child => /*#__PURE__*/_react.default.isValidElement(child) && (child.type === _option.default || child.type === _optionRow.default));
|
|
209
209
|
const getNextHighlightableItemIndex = (0, _react.useCallback)((key, indexOfHighlighted) => {
|
|
210
210
|
const lastIndex = lastOptionIndex;
|
|
@@ -30,12 +30,11 @@ const StyledSelectText = exports.StyledSelectText = _styledComponents.default.sp
|
|
|
30
30
|
${transparent && (0, _styledComponents.css)`
|
|
31
31
|
font-weight: 500;
|
|
32
32
|
text-align: right;
|
|
33
|
-
flex-direction: row-reverse;
|
|
34
33
|
`}
|
|
35
34
|
|
|
36
35
|
${hasPlaceholder && (0, _styledComponents.css)`
|
|
37
|
-
color: var(--colorsUtilityYin055);
|
|
38
|
-
font-weight: normal;
|
|
36
|
+
color: ${transparent ? `var(--colorsUtilityYin100)` : `var(--colorsUtilityYin055)`};
|
|
37
|
+
font-weight: ${transparent ? 500 : "normal"};
|
|
39
38
|
user-select: none;
|
|
40
39
|
`}
|
|
41
40
|
|