@invoicebox/ui 0.1.0-alpha.220 → 0.1.0-alpha.221

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.
@@ -4,7 +4,7 @@ type TOption = {
4
4
  value: string;
5
5
  entity?: any;
6
6
  };
7
- type TFieldProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'onBlur' | 'onFocus' | 'autoFocus'> & {
7
+ type TFieldProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'onBlur' | 'onFocus' | 'autoFocus' | 'readOnly'> & {
8
8
  value: string;
9
9
  onChange: (value: string, option?: TOption) => void;
10
10
  };
@@ -26,7 +26,7 @@ type TControlProps = {
26
26
  required?: boolean;
27
27
  };
28
28
  export type TProps = TFieldProps & TControlProps;
29
- export declare const Autocomplete: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "name" | "autoFocus" | "onFocus" | "onBlur"> & {
29
+ export declare const Autocomplete: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "name" | "readOnly" | "autoFocus" | "onFocus" | "onBlur"> & {
30
30
  value: string;
31
31
  onChange: (value: string, option?: TOption) => void;
32
32
  } & TControlProps & React.RefAttributes<HTMLInputElement>>;
@@ -56,7 +56,8 @@ var Autocomplete = exports.Autocomplete = /*#__PURE__*/(0, _react.forwardRef)(fu
56
56
  size = _ref$size === void 0 ? 'M' : _ref$size,
57
57
  autoFocus = _ref.autoFocus,
58
58
  _ref$required = _ref.required,
59
- required = _ref$required === void 0 ? false : _ref$required;
59
+ required = _ref$required === void 0 ? false : _ref$required,
60
+ readOnly = _ref.readOnly;
60
61
  var isMobile = (0, _useMedia.useMobile)();
61
62
  var _useState = (0, _react.useState)(false),
62
63
  _useState2 = _slicedToArray(_useState, 2),
@@ -110,7 +111,8 @@ var Autocomplete = exports.Autocomplete = /*#__PURE__*/(0, _react.forwardRef)(fu
110
111
  paddingLeft: inputPaddingLeft,
111
112
  maxLength: inputMaxLength,
112
113
  isOnlyNumbers: isInputOnlyNumbers,
113
- autoFocus: autoFocus
114
+ autoFocus: autoFocus,
115
+ readOnly: readOnly
114
116
  }, _constants.SIZE_PARAMS_MAP[size])))), /*#__PURE__*/_react["default"].createElement(_Dropdown.Dropdown, {
115
117
  isOpen: isOpen && (!!options.length || !!isLoading),
116
118
  isAutoPosition: true,
@@ -57,7 +57,8 @@ var Default = exports.Default = {
57
57
  disabled: false,
58
58
  isCustomOptionRender: false,
59
59
  children: 'children',
60
- inputPaddingLeft: 60
60
+ inputPaddingLeft: 60,
61
+ readOnly: false
61
62
  },
62
63
  render: Component
63
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicebox/ui",
3
- "version": "0.1.0-alpha.220",
3
+ "version": "0.1.0-alpha.221",
4
4
  "description": "Invoicebox UI",
5
5
  "license": "Apache License 2.0",
6
6
  "scripts": {