formsy-semantic-ui-react
Advanced tools
Comparing version 2.3.4 to 2.3.5
@@ -7,4 +7,13 @@ ### Changelog | ||
#### [v2.3.5](https://github.com/zabute/formsy-semantic-ui-react/compare/v2.3.4...v2.3.5) | ||
- 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) | ||
- 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) | ||
- build(deps): bump @babel/traverse from 7.22.8 to 7.23.2 [`#141`](https://github.com/zabute/formsy-semantic-ui-react/pull/141) | ||
- fix: Form static props are recognized as any in TS [`a8953c6`](https://github.com/zabute/formsy-semantic-ui-react/commit/a8953c66a46776f0924db39ebd5feef73ef832ff) | ||
#### [v2.3.4](https://github.com/zabute/formsy-semantic-ui-react/compare/v2.3.3...v2.3.4) | ||
> 20 September 2023 | ||
- Bump @adobe/css-tools from 4.2.0 to 4.3.1 [`#139`](https://github.com/zabute/formsy-semantic-ui-react/pull/139) | ||
@@ -11,0 +20,0 @@ - fix: move @types/hoist-non-react-statics from deps to devDeps [`cd72fb6`](https://github.com/zabute/formsy-semantic-ui-react/commit/cd72fb64597db16c9bb8a7e5e916462dbf34d46f) |
@@ -35,3 +35,3 @@ import Formsy from 'formsy-react'; | ||
} | ||
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; | ||
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; |
@@ -471,3 +471,3 @@ 'use strict'; | ||
}; | ||
var Form$1 = /*#__PURE__*/hoistNonReactStatics( /*#__PURE__*/React__default.forwardRef(function (props, ref) { | ||
var HoistedForm = /*#__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 = Form$1; | ||
exports.Form = HoistedForm; | ||
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$2, Dropdown, Input, Select } from 'semantic-ui-react'; | ||
import { Checkbox as Checkbox$1, Radio, Form as Form$1, Dropdown, Input, Select } from 'semantic-ui-react'; | ||
@@ -98,3 +98,3 @@ function _extends() { | ||
} | ||
return React.createElement(Form$2.Field, { | ||
return React.createElement(Form$1.Field, { | ||
as: as, | ||
@@ -185,3 +185,3 @@ className: className, | ||
passRequiredToField = _this$props3.passRequiredToField; | ||
var shortHandMode = inputAs === Form$2.Dropdown || inputAs === Form$2.Select; | ||
var shortHandMode = inputAs === Form$1.Dropdown || inputAs === Form$1.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$2.Field, { | ||
return React.createElement(Form$1.Field, { | ||
as: as, | ||
@@ -285,11 +285,11 @@ className: className, | ||
}); | ||
var isFormField = inputAs === Form$2.Input || inputAs === Form$2.TextArea; | ||
var isFormField = inputAs === Form$1.Input || inputAs === Form$1.TextArea; | ||
var inputNode = isFormField ? createElement(inputAs).props.control : inputAs; | ||
if (isFormField) { | ||
delete inputProps.label; | ||
if (inputAs === Form$2.TextArea) delete inputProps.error; | ||
if (inputAs === Form$1.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$2.Field, { | ||
return React.createElement(Form$1.Field, { | ||
as: as, | ||
@@ -373,3 +373,3 @@ className: className, | ||
}; | ||
return React.createElement(Form$2.Group, Object.assign({}, formGroupProps), label && React.createElement(Form$2.Field, Object.assign({}, labelProps)), Children.map(children, function (radio) { | ||
return React.createElement(Form$1.Group, Object.assign({}, formGroupProps), label && React.createElement(Form$1.Field, Object.assign({}, labelProps)), Children.map(children, function (radio) { | ||
if (!radio) { | ||
@@ -384,3 +384,3 @@ return null; | ||
}; | ||
return React.createElement(Form$2.Field, Object.assign({}, fieldProps), cloneElement(radio, _extends({}, props))); | ||
return React.createElement(Form$1.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$2.TextArea | ||
inputAs: Form$1.TextArea | ||
}, props)); | ||
@@ -429,3 +429,3 @@ }); | ||
onSubmit: onSubmit | ||
}, nonSemanticUIFormProps), React.createElement(Form$2, Object.assign({ | ||
}, nonSemanticUIFormProps), React.createElement(Form$1, Object.assign({ | ||
as: as | ||
@@ -445,9 +445,9 @@ }, nonFormsyReactFormProps), children)); | ||
Form.Checkbox = Checkbox; | ||
Form.Button = Form$2.Button; | ||
Form.Radio = Form$2.Radio; | ||
Form.Field = Form$2.Field; | ||
Form.Group = Form$2.Group; | ||
Form.Button = Form$1.Button; | ||
Form.Radio = Form$1.Radio; | ||
Form.Field = Form$1.Field; | ||
Form.Group = Form$1.Group; | ||
Form.Input = function (props) { | ||
return React.createElement(FormsyInput$1, Object.assign({ | ||
inputAs: Form$2.Input | ||
inputAs: Form$1.Input | ||
}, props)); | ||
@@ -457,3 +457,3 @@ }; | ||
return React.createElement(FormsyTextArea, Object.assign({ | ||
inputAs: Form$2.TextArea | ||
inputAs: Form$1.TextArea | ||
}, props)); | ||
@@ -463,3 +463,3 @@ }; | ||
return React.createElement(FormsySelect, Object.assign({ | ||
inputAs: Form$2.Select | ||
inputAs: Form$1.Select | ||
}, props)); | ||
@@ -472,6 +472,6 @@ }; | ||
return React.createElement(FormsyDropdown$1, Object.assign({ | ||
inputAs: Form$2.Dropdown | ||
inputAs: Form$1.Dropdown | ||
}, props)); | ||
}; | ||
var Form$1 = /*#__PURE__*/hoistNonReactStatics( /*#__PURE__*/React.forwardRef(function (props, ref) { | ||
var HoistedForm = /*#__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, Form$1 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, HoistedForm 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.4", | ||
"version": "2.3.5", | ||
"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
195977
1803