@thecb/components 6.0.0-beta.4 → 6.0.0-beta.5
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/dist/index.cjs.js
CHANGED
|
@@ -19446,9 +19446,10 @@ var DropdownItemWrapper = styled__default.div.withConfig({
|
|
|
19446
19446
|
var SearchInput = styled__default.input.withConfig({
|
|
19447
19447
|
displayName: "Dropdown__SearchInput",
|
|
19448
19448
|
componentId: "sc-pn6m0h-3"
|
|
19449
|
-
})(["border:none;background-color:", ";font-size:16px;height:24px;"], function (_ref8) {
|
|
19450
|
-
var themeValues = _ref8.themeValues
|
|
19451
|
-
|
|
19449
|
+
})(["border:none;background-color:", ";font-size:16px;height:24px;min-width:75%;"], function (_ref8) {
|
|
19450
|
+
var themeValues = _ref8.themeValues,
|
|
19451
|
+
isOpen = _ref8.isOpen;
|
|
19452
|
+
return isOpen ? themeValues.hoverColor && themeValues.hoverColor : "WHITE";
|
|
19452
19453
|
});
|
|
19453
19454
|
|
|
19454
19455
|
var Dropdown = function Dropdown(_ref9) {
|
|
@@ -19663,6 +19664,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19663
19664
|
borderSize: "1px",
|
|
19664
19665
|
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
|
|
19665
19666
|
borderRadius: "2px",
|
|
19667
|
+
tabIndex: 0,
|
|
19666
19668
|
dataQa: placeholder,
|
|
19667
19669
|
extraStyles: "height: 48px;\n ".concat(disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;", "\n ")
|
|
19668
19670
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
@@ -19680,7 +19682,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19680
19682
|
"aria-autocomplete": "list",
|
|
19681
19683
|
"aria-controls": "".concat(ariaLabelledby, "_listbox"),
|
|
19682
19684
|
"aria-activedescendant": "selected_option",
|
|
19683
|
-
|
|
19685
|
+
isOpen: isOpen
|
|
19684
19686
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
19685
19687
|
open: isOpen
|
|
19686
19688
|
}, /*#__PURE__*/React__default.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React__default.createElement(DropdownContentWrapper, {
|
|
@@ -19694,7 +19696,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19694
19696
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19695
19697
|
childGap: "0"
|
|
19696
19698
|
}, filteredOptions.map(function (choice, i) {
|
|
19697
|
-
if (
|
|
19699
|
+
if (choice.value === value && selectedRef !== optionRefs.current[i]) {
|
|
19698
19700
|
setSelectedRef(optionRefs.current[i]);
|
|
19699
19701
|
}
|
|
19700
19702
|
|
|
@@ -19707,7 +19709,8 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19707
19709
|
onClick: disabledValues.includes(choice.value) ? function (evt) {
|
|
19708
19710
|
return evt.preventDefault();
|
|
19709
19711
|
} : function () {
|
|
19710
|
-
|
|
19712
|
+
setSelectedRef(optionRefs.current[i]);
|
|
19713
|
+
onSelect(choice.value);
|
|
19711
19714
|
},
|
|
19712
19715
|
selected: choice.value === value,
|
|
19713
19716
|
"aria-selected": choice.value === value,
|