@invoicebox/ui 0.1.0-alpha.92 → 0.1.0-alpha.94
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.
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TProps as PureInputProps } from '../PureInput';
|
|
3
3
|
export type TProps = Pick<PureInputProps, 'placeholder' | 'hasBorder' | 'autoFocus'> & {
|
|
4
4
|
value: string;
|
|
5
5
|
onChange: (value: string) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare const SearchInput:
|
|
7
|
+
export declare const SearchInput: React.ForwardRefExoticComponent<Pick<PureInputProps, "placeholder" | "autoFocus" | "hasBorder"> & {
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -15,7 +15,7 @@ var _CrossIcon = require("./components/CrossIcon");
|
|
|
15
15
|
var _palette = require("../../../palette");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
|
-
var SearchInput = exports.SearchInput = function
|
|
18
|
+
var SearchInput = exports.SearchInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
19
19
|
var onChange = _ref.onChange,
|
|
20
20
|
placeholder = _ref.placeholder,
|
|
21
21
|
hasBorder = _ref.hasBorder,
|
|
@@ -33,6 +33,7 @@ var SearchInput = exports.SearchInput = function SearchInput(_ref) {
|
|
|
33
33
|
onChange(event.target.value);
|
|
34
34
|
}, [onChange]);
|
|
35
35
|
return /*#__PURE__*/_react["default"].createElement(_InputLabel.InputLabel, null, /*#__PURE__*/_react["default"].createElement(_PureInput.PureInput, {
|
|
36
|
+
ref: ref,
|
|
36
37
|
paddingRight: 56,
|
|
37
38
|
hasBorder: hasBorder,
|
|
38
39
|
onChange: handleInputChange,
|
|
@@ -49,4 +50,5 @@ var SearchInput = exports.SearchInput = function SearchInput(_ref) {
|
|
|
49
50
|
type: "button",
|
|
50
51
|
onClick: handleInputReset
|
|
51
52
|
}, /*#__PURE__*/_react["default"].createElement(_CrossIcon.CrossIcon, null)) : /*#__PURE__*/_react["default"].createElement(_SearchIcon.SearchIcon, null)));
|
|
52
|
-
};
|
|
53
|
+
});
|
|
54
|
+
SearchInput.displayName = 'SearchInput';
|