formsy-semantic-ui-react
Advanced tools
Comparing version 2.3.5 to 2.3.6
@@ -7,4 +7,10 @@ ### Changelog | ||
#### [v2.3.6](https://github.com/zabute/formsy-semantic-ui-react/compare/v2.3.5...v2.3.6) | ||
- Revert "fix: Form static props are recognized as any in TS" [`12bd234`](https://github.com/zabute/formsy-semantic-ui-react/commit/12bd234e71defdcf1b01a53aef147ada972e1ecf) | ||
#### [v2.3.5](https://github.com/zabute/formsy-semantic-ui-react/compare/v2.3.4...v2.3.5) | ||
> 24 April 2024 | ||
- build(deps): bump browserify-sign from 4.2.1 to 4.2.2 in /example [`#142`](https://github.com/zabute/formsy-semantic-ui-react/pull/142) | ||
@@ -11,0 +17,0 @@ - build(deps): bump @babel/traverse from 7.11.0 to 7.23.2 in /example [`#140`](https://github.com/zabute/formsy-semantic-ui-react/pull/140) |
@@ -35,3 +35,3 @@ import Formsy from 'formsy-react'; | ||
} | ||
declare const HoistedForm: React.ForwardRefExoticComponent<Partial<FormsyProps> & Pick<StrictFormProps, "as" | "action" | "children" | "className" | "error" | "inverted" | "loading" | "reply" | "size" | "success" | "unstackable" | "warning" | "widths"> & React.RefAttributes<Formsy>> & hoistNonReactStatics.NonReactStatics<typeof Form, {}>; | ||
export default HoistedForm; | ||
declare const _default: React.ForwardRefExoticComponent<Partial<FormsyProps> & Pick<StrictFormProps, "as" | "action" | "children" | "className" | "error" | "inverted" | "loading" | "reply" | "size" | "success" | "unstackable" | "warning" | "widths"> & React.RefAttributes<Formsy>> & hoistNonReactStatics.NonReactStatics<typeof Form, {}>; | ||
export default _default; |
@@ -471,3 +471,3 @@ 'use strict'; | ||
}; | ||
var HoistedForm = /*#__PURE__*/hoistNonReactStatics( /*#__PURE__*/React__default.forwardRef(function (props, ref) { | ||
var Form$1 = /*#__PURE__*/hoistNonReactStatics( /*#__PURE__*/React__default.forwardRef(function (props, ref) { | ||
return React__default.createElement(Form, Object.assign({}, props, { | ||
@@ -486,3 +486,3 @@ forwardedRef: ref | ||
exports.Dropdown = FormsyDropdown$1; | ||
exports.Form = HoistedForm; | ||
exports.Form = Form$1; | ||
exports.Input = FormsyInput$1; | ||
@@ -489,0 +489,0 @@ exports.Radio = FormsyRadio; |
@@ -5,3 +5,3 @@ import Formsy, { withFormsy } from 'formsy-react'; | ||
import React, { createElement, cloneElement, Component, isValidElement, Children } from 'react'; | ||
import { Checkbox as Checkbox$1, Radio, Form as Form$1, Dropdown, Input, Select } from 'semantic-ui-react'; | ||
import { Checkbox as Checkbox$1, Radio, Form as Form$2, Dropdown, Input, Select } from 'semantic-ui-react'; | ||
@@ -98,3 +98,3 @@ function _extends() { | ||
} | ||
return React.createElement(Form$1.Field, { | ||
return React.createElement(Form$2.Field, { | ||
as: as, | ||
@@ -185,3 +185,3 @@ className: className, | ||
passRequiredToField = _this$props3.passRequiredToField; | ||
var shortHandMode = inputAs === Form$1.Dropdown || inputAs === Form$1.Select; | ||
var shortHandMode = inputAs === Form$2.Dropdown || inputAs === Form$2.Select; | ||
var error = !isPristine && !isValid && this.state.allowError; | ||
@@ -197,3 +197,3 @@ var dropdownProps = _extends({}, filterSuirElementProps(this.props), { | ||
var dropdownNode = shortHandMode ? createElement(inputAs, dropdownProps).props.control : inputAs; | ||
return React.createElement(Form$1.Field, { | ||
return React.createElement(Form$2.Field, { | ||
as: as, | ||
@@ -285,11 +285,11 @@ className: className, | ||
}); | ||
var isFormField = inputAs === Form$1.Input || inputAs === Form$1.TextArea; | ||
var isFormField = inputAs === Form$2.Input || inputAs === Form$2.TextArea; | ||
var inputNode = isFormField ? createElement(inputAs).props.control : inputAs; | ||
if (isFormField) { | ||
delete inputProps.label; | ||
if (inputAs === Form$1.TextArea) delete inputProps.error; | ||
if (inputAs === Form$2.TextArea) delete inputProps.error; | ||
} | ||
var inputElement = !isFormField && isValidElement(inputAs) ? cloneElement(inputAs, _extends({}, inputProps, inputAs.props)) : createElement(inputNode, _extends({}, inputProps)); | ||
var shouldShowFormLabel = isFormField || isValidElement(inputAs); | ||
return React.createElement(Form$1.Field, { | ||
return React.createElement(Form$2.Field, { | ||
as: as, | ||
@@ -373,3 +373,3 @@ className: className, | ||
}; | ||
return React.createElement(Form$1.Group, Object.assign({}, formGroupProps), label && React.createElement(Form$1.Field, Object.assign({}, labelProps)), Children.map(children, function (radio) { | ||
return React.createElement(Form$2.Group, Object.assign({}, formGroupProps), label && React.createElement(Form$2.Field, Object.assign({}, labelProps)), Children.map(children, function (radio) { | ||
if (!radio) { | ||
@@ -384,3 +384,3 @@ return null; | ||
}; | ||
return React.createElement(Form$1.Field, Object.assign({}, fieldProps), cloneElement(radio, _extends({}, props))); | ||
return React.createElement(Form$2.Field, Object.assign({}, fieldProps), cloneElement(radio, _extends({}, props))); | ||
}), error && errorLabel && cloneElement(errorLabel, {}, errorMessage)); | ||
@@ -403,3 +403,3 @@ }; | ||
return React.createElement(FormsyInput$1, Object.assign({ | ||
inputAs: Form$1.TextArea | ||
inputAs: Form$2.TextArea | ||
}, props)); | ||
@@ -429,3 +429,3 @@ }); | ||
onSubmit: onSubmit | ||
}, nonSemanticUIFormProps), React.createElement(Form$1, Object.assign({ | ||
}, nonSemanticUIFormProps), React.createElement(Form$2, Object.assign({ | ||
as: as | ||
@@ -445,9 +445,9 @@ }, nonFormsyReactFormProps), children)); | ||
Form.Checkbox = Checkbox; | ||
Form.Button = Form$1.Button; | ||
Form.Radio = Form$1.Radio; | ||
Form.Field = Form$1.Field; | ||
Form.Group = Form$1.Group; | ||
Form.Button = Form$2.Button; | ||
Form.Radio = Form$2.Radio; | ||
Form.Field = Form$2.Field; | ||
Form.Group = Form$2.Group; | ||
Form.Input = function (props) { | ||
return React.createElement(FormsyInput$1, Object.assign({ | ||
inputAs: Form$1.Input | ||
inputAs: Form$2.Input | ||
}, props)); | ||
@@ -457,3 +457,3 @@ }; | ||
return React.createElement(FormsyTextArea, Object.assign({ | ||
inputAs: Form$1.TextArea | ||
inputAs: Form$2.TextArea | ||
}, props)); | ||
@@ -463,3 +463,3 @@ }; | ||
return React.createElement(FormsySelect, Object.assign({ | ||
inputAs: Form$1.Select | ||
inputAs: Form$2.Select | ||
}, props)); | ||
@@ -472,6 +472,6 @@ }; | ||
return React.createElement(FormsyDropdown$1, Object.assign({ | ||
inputAs: Form$1.Dropdown | ||
inputAs: Form$2.Dropdown | ||
}, props)); | ||
}; | ||
var HoistedForm = /*#__PURE__*/hoistNonReactStatics( /*#__PURE__*/React.forwardRef(function (props, ref) { | ||
var Form$1 = /*#__PURE__*/hoistNonReactStatics( /*#__PURE__*/React.forwardRef(function (props, ref) { | ||
return React.createElement(Form, Object.assign({}, props, { | ||
@@ -488,3 +488,3 @@ forwardedRef: ref | ||
export { Checkbox, FormsyDropdown$1 as Dropdown, HoistedForm as Form, FormsyInput$1 as Input, FormsyRadio as Radio, FormsyRadioGroup$1 as RadioGroup, FormsySelect as Select, FormsyTextArea as TextArea }; | ||
export { Checkbox, FormsyDropdown$1 as Dropdown, Form$1 as Form, FormsyInput$1 as Input, FormsyRadio as Radio, FormsyRadioGroup$1 as RadioGroup, FormsySelect as Select, FormsyTextArea as TextArea }; | ||
//# sourceMappingURL=formsy-semantic-ui-react.esm.js.map |
{ | ||
"name": "formsy-semantic-ui-react", | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"description": "Formsy-React wrappers for Semantic-Ui-React's form Components", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
196021
1802