@thecb/components 6.0.0-beta.13 → 6.0.0-beta.14

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
@@ -19415,7 +19415,7 @@ var IconWrapper = styled__default.div.withConfig({
19415
19415
  var DropdownContentWrapper = styled__default.div.withConfig({
19416
19416
  displayName: "Dropdown__DropdownContentWrapper",
19417
19417
  componentId: "sc-pn6m0h-1"
19418
- })(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}"], GREY_CHATEAU, WHITE, function (_ref2) {
19418
+ })(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}ul{padding-left:0;}"], GREY_CHATEAU, WHITE, function (_ref2) {
19419
19419
  var widthFitOptions = _ref2.widthFitOptions;
19420
19420
  return widthFitOptions ? "fit-content" : "100%";
19421
19421
  }, function (_ref3) {
@@ -19454,7 +19454,7 @@ var Dropdown = function Dropdown(_ref8) {
19454
19454
  _ref8$disabledValues = _ref8.disabledValues,
19455
19455
  disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
19456
19456
  _ref8$onClick = _ref8.onClick,
19457
- onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
19457
+ _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
19458
19458
  themeValues = _ref8.themeValues,
19459
19459
  maxHeight = _ref8.maxHeight,
19460
19460
  _ref8$widthFitOptions = _ref8.widthFitOptions,
@@ -19554,7 +19554,7 @@ var Dropdown = function Dropdown(_ref8) {
19554
19554
  break;
19555
19555
  }
19556
19556
  } else {
19557
- onClick();
19557
+ _onClick();
19558
19558
  }
19559
19559
 
19560
19560
  break;
@@ -19570,7 +19570,7 @@ var Dropdown = function Dropdown(_ref8) {
19570
19570
  break;
19571
19571
  }
19572
19572
  } else {
19573
- onClick();
19573
+ _onClick();
19574
19574
  }
19575
19575
 
19576
19576
  break;
@@ -19599,7 +19599,7 @@ var Dropdown = function Dropdown(_ref8) {
19599
19599
 
19600
19600
  case "Escape":
19601
19601
  if (isOpen) {
19602
- onClick();
19602
+ _onClick();
19603
19603
  }
19604
19604
 
19605
19605
  break;
@@ -19650,8 +19650,18 @@ var Dropdown = function Dropdown(_ref8) {
19650
19650
  }, [filteredOptions]);
19651
19651
  return /*#__PURE__*/React__default.createElement(Box, {
19652
19652
  padding: "0",
19653
+ background: isOpen ? themeValues.hoverColor : WHITE,
19654
+ borderSize: "1px",
19655
+ borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19656
+ borderRadius: "2px",
19657
+ borderWidthOverride: "0px 1px 0px 0px",
19653
19658
  extraStyles: "position: relative;",
19654
19659
  minWidth: "100%",
19660
+ onClick: function onClick() {
19661
+ if (!isOpen) {
19662
+ _onClick();
19663
+ }
19664
+ },
19655
19665
  width: "100%"
19656
19666
  }, /*#__PURE__*/React__default.createElement(Stack, {
19657
19667
  direction: "row",
@@ -19671,14 +19681,19 @@ var Dropdown = function Dropdown(_ref8) {
19671
19681
  borderRadius: "2px",
19672
19682
  borderSize: "1px",
19673
19683
  borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19684
+ borderWidthOverride: "1px 0px 1px 1px",
19674
19685
  extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
19675
19686
  hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
19676
19687
  isOpen: isOpen,
19688
+ minHeight: "48px",
19677
19689
  minWidth: "85%",
19678
19690
  name: autocompleteValue,
19679
19691
  onKeyDown: onKeyDown,
19680
- onClick: onClick,
19681
- onFocus: onClick,
19692
+ onFocus: function onFocus() {
19693
+ if (!isOpen) {
19694
+ _onClick();
19695
+ }
19696
+ },
19682
19697
  onChange: function onChange(e) {
19683
19698
  console.log("input change event", e.target);
19684
19699
  console.log("input change event value", e.target.value);
@@ -19690,7 +19705,7 @@ var Dropdown = function Dropdown(_ref8) {
19690
19705
  themeValues: themeValues,
19691
19706
  title: hasTitles ? getSelection() : null,
19692
19707
  type: "text",
19693
- tabIndex: -1,
19708
+ tabIndex: 0,
19694
19709
  value: inputValue,
19695
19710
  width: "85%",
19696
19711
  dataQa: placeholder