acsi-core 0.1.19 → 0.1.20

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.
@@ -9,6 +9,8 @@ interface IProps {
9
9
  placeholder?: string;
10
10
  error?: boolean;
11
11
  tooltip?: string;
12
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
13
+ [key: string]: any;
12
14
  }
13
15
  declare const CoreInputCompact: (props: IProps) => React.JSX.Element;
14
16
  export default CoreInputCompact;
package/dist/index.js CHANGED
@@ -1779,6 +1779,7 @@ var CoreSelectCompact = function CoreSelectCompact(props) {
1779
1779
 
1780
1780
  var styles$b = {"core-input-compact":"_1qmXW","label":"_1argp","icon":"_3DPRG"};
1781
1781
 
1782
+ var _excluded = ["name", "value", "onChange", "disabled", "label", "width", "placeholder", "error", "tooltip", "onKeyDown"];
1782
1783
  var CoreInputCompact = function CoreInputCompact(props) {
1783
1784
  var _props$name = props.name,
1784
1785
  name = _props$name === void 0 ? "" : _props$name,
@@ -1791,7 +1792,9 @@ var CoreInputCompact = function CoreInputCompact(props) {
1791
1792
  _props$placeholder = props.placeholder,
1792
1793
  placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
1793
1794
  error = props.error,
1794
- tooltip = props.tooltip;
1795
+ tooltip = props.tooltip,
1796
+ _onKeyDown = props.onKeyDown,
1797
+ rest = _objectWithoutPropertiesLoose(props, _excluded);
1795
1798
  var _useState = React.useState(false),
1796
1799
  isOpenTooltip = _useState[0],
1797
1800
  setIsOpenTooltip = _useState[1];
@@ -1808,7 +1811,7 @@ var CoreInputCompact = function CoreInputCompact(props) {
1808
1811
  }, React__default.createElement("label", null, label), tooltip ? React__default.createElement("div", {
1809
1812
  id: name,
1810
1813
  className: styles$b["icon"]
1811
- }, React__default.createElement(Info, null)) : null), React__default.createElement("input", {
1814
+ }, React__default.createElement(Info, null)) : null), React__default.createElement("input", Object.assign({
1812
1815
  style: {
1813
1816
  backgroundColor: error ? COLORS.lightYellow : "transparent"
1814
1817
  },
@@ -1818,8 +1821,11 @@ var CoreInputCompact = function CoreInputCompact(props) {
1818
1821
  return _onChange(name, e.target.value);
1819
1822
  },
1820
1823
  disabled: disabled,
1821
- placeholder: placeholder
1822
- }), tooltip && React__default.createElement(reactstrap.Tooltip, {
1824
+ placeholder: placeholder,
1825
+ onKeyDown: function onKeyDown(e) {
1826
+ _onKeyDown && _onKeyDown(e);
1827
+ }
1828
+ }, rest)), tooltip && React__default.createElement(reactstrap.Tooltip, {
1823
1829
  target: name,
1824
1830
  isOpen: isOpenTooltip,
1825
1831
  toggle: toggleTooltip
@@ -1928,7 +1934,7 @@ var CustomOption = function CustomOption(props) {
1928
1934
  }, props.data.label));
1929
1935
  };
1930
1936
 
1931
- var _excluded = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
1937
+ var _excluded$1 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
1932
1938
  var CustomSelect = function CustomSelect(_ref) {
1933
1939
  var isDefault = _ref.isDefault,
1934
1940
  options = _ref.options,
@@ -1936,7 +1942,7 @@ var CustomSelect = function CustomSelect(_ref) {
1936
1942
  scrollBottom = _ref.scrollBottom,
1937
1943
  value = _ref.value,
1938
1944
  isMulti = _ref.isMulti,
1939
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
1945
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1940
1946
  var initialValues = Array.isArray(value) ? options.filter(function (i) {
1941
1947
  return value.includes(i.value);
1942
1948
  }) : isMulti ? options === null || options === void 0 ? void 0 : options.filter(function (i) {
@@ -1963,7 +1969,7 @@ var CustomSelect = function CustomSelect(_ref) {
1963
1969
  }, rest));
1964
1970
  };
1965
1971
 
1966
- var _excluded$1 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
1972
+ var _excluded$2 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
1967
1973
  var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
1968
1974
  var isDefault = _ref.isDefault,
1969
1975
  options = _ref.options,
@@ -1971,7 +1977,7 @@ var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
1971
1977
  scrollBottom = _ref.scrollBottom,
1972
1978
  value = _ref.value,
1973
1979
  isMulti = _ref.isMulti,
1974
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1980
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1975
1981
  var initialValues = Array.isArray(value) ? options.filter(function (i) {
1976
1982
  return value.includes(i.value);
1977
1983
  }) : isMulti ? options.filter(function (i) {
@@ -1998,14 +2004,14 @@ var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
1998
2004
  }, rest));
1999
2005
  };
2000
2006
 
2001
- var _excluded$2 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
2007
+ var _excluded$3 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
2002
2008
  var CustomCreatable = function CustomCreatable(_ref) {
2003
2009
  var options = _ref.options,
2004
2010
  isDisabled = _ref.isDisabled,
2005
2011
  scrollBottom = _ref.scrollBottom,
2006
2012
  value = _ref.value,
2007
2013
  isMulti = _ref.isMulti,
2008
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2014
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2009
2015
  var initialValues = Array.isArray(value) ? options.filter(function (i) {
2010
2016
  return value.includes(i.value);
2011
2017
  }) : isMulti ? options.filter(function (i) {
@@ -2032,7 +2038,7 @@ var CustomCreatable = function CustomCreatable(_ref) {
2032
2038
  }, rest));
2033
2039
  };
2034
2040
 
2035
- var _excluded$3 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
2041
+ var _excluded$4 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
2036
2042
  var CustomSelectOption = function CustomSelectOption(_ref) {
2037
2043
  var defaultValue = _ref.defaultValue,
2038
2044
  options = _ref.options,
@@ -2040,7 +2046,7 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
2040
2046
  scrollBottom = _ref.scrollBottom,
2041
2047
  value = _ref.value,
2042
2048
  isMulti = _ref.isMulti,
2043
- rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2049
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
2044
2050
  var initialValues = defaultValue !== null && typeof defaultValue !== "undefined" ? options.find(function (option) {
2045
2051
  return option.value === defaultValue;
2046
2052
  }) || null : null;