@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.esm.js CHANGED
@@ -19407,7 +19407,7 @@ var IconWrapper = styled.div.withConfig({
19407
19407
  var DropdownContentWrapper = styled.div.withConfig({
19408
19408
  displayName: "Dropdown__DropdownContentWrapper",
19409
19409
  componentId: "sc-pn6m0h-1"
19410
- })(["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) {
19410
+ })(["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) {
19411
19411
  var widthFitOptions = _ref2.widthFitOptions;
19412
19412
  return widthFitOptions ? "fit-content" : "100%";
19413
19413
  }, function (_ref3) {
@@ -19446,7 +19446,7 @@ var Dropdown = function Dropdown(_ref8) {
19446
19446
  _ref8$disabledValues = _ref8.disabledValues,
19447
19447
  disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
19448
19448
  _ref8$onClick = _ref8.onClick,
19449
- onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
19449
+ _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
19450
19450
  themeValues = _ref8.themeValues,
19451
19451
  maxHeight = _ref8.maxHeight,
19452
19452
  _ref8$widthFitOptions = _ref8.widthFitOptions,
@@ -19546,7 +19546,7 @@ var Dropdown = function Dropdown(_ref8) {
19546
19546
  break;
19547
19547
  }
19548
19548
  } else {
19549
- onClick();
19549
+ _onClick();
19550
19550
  }
19551
19551
 
19552
19552
  break;
@@ -19562,7 +19562,7 @@ var Dropdown = function Dropdown(_ref8) {
19562
19562
  break;
19563
19563
  }
19564
19564
  } else {
19565
- onClick();
19565
+ _onClick();
19566
19566
  }
19567
19567
 
19568
19568
  break;
@@ -19591,7 +19591,7 @@ var Dropdown = function Dropdown(_ref8) {
19591
19591
 
19592
19592
  case "Escape":
19593
19593
  if (isOpen) {
19594
- onClick();
19594
+ _onClick();
19595
19595
  }
19596
19596
 
19597
19597
  break;
@@ -19642,8 +19642,18 @@ var Dropdown = function Dropdown(_ref8) {
19642
19642
  }, [filteredOptions]);
19643
19643
  return /*#__PURE__*/React.createElement(Box, {
19644
19644
  padding: "0",
19645
+ background: isOpen ? themeValues.hoverColor : WHITE,
19646
+ borderSize: "1px",
19647
+ borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19648
+ borderRadius: "2px",
19649
+ borderWidthOverride: "0px 1px 0px 0px",
19645
19650
  extraStyles: "position: relative;",
19646
19651
  minWidth: "100%",
19652
+ onClick: function onClick() {
19653
+ if (!isOpen) {
19654
+ _onClick();
19655
+ }
19656
+ },
19647
19657
  width: "100%"
19648
19658
  }, /*#__PURE__*/React.createElement(Stack, {
19649
19659
  direction: "row",
@@ -19663,14 +19673,19 @@ var Dropdown = function Dropdown(_ref8) {
19663
19673
  borderRadius: "2px",
19664
19674
  borderSize: "1px",
19665
19675
  borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
19676
+ borderWidthOverride: "1px 0px 1px 1px",
19666
19677
  extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
19667
19678
  hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
19668
19679
  isOpen: isOpen,
19680
+ minHeight: "48px",
19669
19681
  minWidth: "85%",
19670
19682
  name: autocompleteValue,
19671
19683
  onKeyDown: onKeyDown,
19672
- onClick: onClick,
19673
- onFocus: onClick,
19684
+ onFocus: function onFocus() {
19685
+ if (!isOpen) {
19686
+ _onClick();
19687
+ }
19688
+ },
19674
19689
  onChange: function onChange(e) {
19675
19690
  console.log("input change event", e.target);
19676
19691
  console.log("input change event value", e.target.value);
@@ -19682,7 +19697,7 @@ var Dropdown = function Dropdown(_ref8) {
19682
19697
  themeValues: themeValues,
19683
19698
  title: hasTitles ? getSelection() : null,
19684
19699
  type: "text",
19685
- tabIndex: -1,
19700
+ tabIndex: 0,
19686
19701
  value: inputValue,
19687
19702
  width: "85%",
19688
19703
  dataQa: placeholder