@uxf/form 1.0.0-beta.172 → 1.0.0-beta.173

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,7 +9,7 @@ const react_hook_form_1 = require("react-hook-form");
9
9
  const react_1 = __importDefault(require("react"));
10
10
  const form_id_context_1 = require("../form-id-context");
11
11
  function Combobox(props) {
12
- var _a, _b, _c, _d, _e;
12
+ var _a, _b, _c, _d, _e, _f;
13
13
  const formId = (0, form_id_context_1.useFormIdContext)();
14
14
  const id = (_a = props.id) !== null && _a !== void 0 ? _a : `${formId}__${props.name}`;
15
15
  const { field, fieldState } = (0, react_hook_form_1.useController)({
@@ -32,7 +32,7 @@ function Combobox(props) {
32
32
  field.onChange(value);
33
33
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, event);
34
34
  };
35
- return (react_1.default.createElement(combobox_1.Combobox, { className: props.className, dropdownPlacement: props.dropdownPlacement, forwardRef: field.ref, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, id: id, isClearable: props.isClearable, isDisabled: ((_e = props.options) === null || _e === void 0 ? void 0 : _e.length) === 0 || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, label: props.label, loadOptions: props.loadOptions, name: field.name, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, value: field.value }));
35
+ return (react_1.default.createElement(combobox_1.Combobox, { className: props.className, dropdownPlacement: props.dropdownPlacement, forwardRef: field.ref, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, id: id, isClearable: props.isClearable, isDisabled: ((_e = props.options) === null || _e === void 0 ? void 0 : _e.length) === 0 || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, label: props.label, loadOptions: props.loadOptions, name: field.name, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, value: (_f = field.value) !== null && _f !== void 0 ? _f : null }));
36
36
  }
37
37
  exports.Combobox = Combobox;
38
38
  Combobox.displayName = "UxfFormCombobox";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/form",
3
- "version": "1.0.0-beta.172",
3
+ "version": "1.0.0-beta.173",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,7 +13,7 @@
13
13
  "author": "UX Fans s.r.o",
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@uxf/ui": "1.0.0-beta.172",
16
+ "@uxf/ui": "1.0.0-beta.173",
17
17
  "react-hook-form": "7.44.3",
18
18
  "coordinate-parser": "1.0.7"
19
19
  }
package/select/select.js CHANGED
@@ -9,7 +9,7 @@ const react_hook_form_1 = require("react-hook-form");
9
9
  const react_1 = __importDefault(require("react"));
10
10
  const form_id_context_1 = require("../form-id-context");
11
11
  function Select(props) {
12
- var _a, _b, _c, _d;
12
+ var _a, _b, _c, _d, _e;
13
13
  const formId = (0, form_id_context_1.useFormIdContext)();
14
14
  const id = (_a = props.id) !== null && _a !== void 0 ? _a : `${formId}__${props.name}`;
15
15
  const { field, fieldState } = (0, react_hook_form_1.useController)({
@@ -32,7 +32,7 @@ function Select(props) {
32
32
  field.onChange(value);
33
33
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, event);
34
34
  };
35
- return (react_1.default.createElement(select_1.Select, { className: props.className, dropdownPlacement: props.dropdownPlacement, forwardRef: field.ref, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, id: id, isClearable: props.isClearable, isDisabled: props.options.length === 0 || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, label: props.label, name: field.name, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, value: field.value }));
35
+ return (react_1.default.createElement(select_1.Select, { className: props.className, dropdownPlacement: props.dropdownPlacement, forwardRef: field.ref, helperText: (_d = (_c = fieldState.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : props.helperText, hiddenLabel: props.hiddenLabel, id: id, isClearable: props.isClearable, isDisabled: props.options.length === 0 || props.isDisabled, isInvalid: !!fieldState.error, isReadOnly: props.isReadOnly, isRequired: props.isRequired, label: props.label, name: field.name, onBlur: onBlur, onChange: onChange, onFocus: props.onFocus, options: props.options, placeholder: props.placeholder, value: (_e = field.value) !== null && _e !== void 0 ? _e : null }));
36
36
  }
37
37
  exports.Select = Select;
38
38
  Select.displayName = "UxfFormSelect";