@invoicebox/ui 0.1.0-alpha.249 → 0.1.0-alpha.254

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,7 @@ export type TProps = {
9
9
  onChange: (value: Date) => void;
10
10
  placeholder?: string;
11
11
  dropdownProps?: Pick<TDropdownProps, 'isAutoPosition' | 'positionLeft' | 'positionRight' | 'positionVertical'>;
12
+ required?: boolean;
12
13
  } & Pick<TPureInputProps, 'hasError' | 'name' | 'onBlur' | 'onFocus'> & Pick<TInputLabelProps, 'label'> & Pick<TCalendarProps, 'maxDate' | 'minDate'> & {
13
14
  size?: TSizes;
14
15
  };
@@ -46,7 +46,9 @@ var DateTimeInput = exports.DateTimeInput = function DateTimeInput(_ref) {
46
46
  _ref$size = _ref.size,
47
47
  size = _ref$size === void 0 ? 'M' : _ref$size,
48
48
  dropdownProps = _ref.dropdownProps,
49
- placeholder = _ref.placeholder;
49
+ placeholder = _ref.placeholder,
50
+ _ref$required = _ref.required,
51
+ required = _ref$required === void 0 ? false : _ref$required;
50
52
  var palette = (0, _palette.useComponentPalette)('dateTimeInput');
51
53
  var inputRef = (0, _react.useRef)(null);
52
54
  var isMobile = (0, _index.useMobile)();
@@ -127,7 +129,8 @@ var DateTimeInput = exports.DateTimeInput = function DateTimeInput(_ref) {
127
129
  ref: isMobile ? undefined : elRef
128
130
  }, /*#__PURE__*/_react["default"].createElement(_InputLabel.InputLabel, {
129
131
  inFocus: inFocus,
130
- label: label
132
+ label: label,
133
+ required: required
131
134
  }, /*#__PURE__*/_react["default"].createElement(S.InputWrapper, null, /*#__PURE__*/_react["default"].createElement(_PureInput.PureInput, _extends({
132
135
  onClick: handleTrigger,
133
136
  ref: inputRef,
@@ -103,10 +103,6 @@ var Validate = exports.Validate = /*#__PURE__*/function () {
103
103
  }, {
104
104
  key: "settlementAccount",
105
105
  value: function settlementAccount(value, bic, createError) {
106
- if (!bic) {
107
- // eslint-disable-next-line no-console
108
- console.error('Form dont have bic');
109
- }
110
106
  if (value === '') {
111
107
  return true;
112
108
  }
@@ -130,10 +126,6 @@ var Validate = exports.Validate = /*#__PURE__*/function () {
130
126
  }, {
131
127
  key: "correspondentAccount",
132
128
  value: function correspondentAccount(value, bic, createError) {
133
- if (!bic) {
134
- // eslint-disable-next-line no-console
135
- console.error('Form dont have bic');
136
- }
137
129
  if (value === '') {
138
130
  return true;
139
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invoicebox/ui",
3
- "version": "0.1.0-alpha.249",
3
+ "version": "0.1.0-alpha.254",
4
4
  "description": "Invoicebox UI",
5
5
  "license": "Apache License 2.0",
6
6
  "scripts": {