@kne/react-form-antd 4.1.7 → 4.1.8
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.
- package/dist/index.css +173 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +22 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -32001,9 +32001,30 @@ const _RadioGroup = props => {
|
|
|
32001
32001
|
_RadioGroup.Field = RadioGroup;
|
|
32002
32002
|
_RadioGroup.Radio = Radio;
|
|
32003
32003
|
|
|
32004
|
+
const MOBILE_STEPPER_CLASS = 'react-form-antd-mobile-stepper';
|
|
32005
|
+
const withMobileStepper = WrappedComponent => {
|
|
32006
|
+
const MobileStepper = forwardRef((props, ref) => {
|
|
32007
|
+
const isMobile = useIsMobile();
|
|
32008
|
+
if (!isMobile) {
|
|
32009
|
+
return /*#__PURE__*/React__default.createElement(WrappedComponent, _extends$3({
|
|
32010
|
+
ref: ref
|
|
32011
|
+
}, props));
|
|
32012
|
+
}
|
|
32013
|
+
return /*#__PURE__*/React__default.createElement(WrappedComponent, _extends$3({
|
|
32014
|
+
ref: ref
|
|
32015
|
+
}, props, {
|
|
32016
|
+
mode: props.mode || 'spinner',
|
|
32017
|
+
className: classnames(props.className, MOBILE_STEPPER_CLASS)
|
|
32018
|
+
}));
|
|
32019
|
+
});
|
|
32020
|
+
MobileStepper.displayName = `withMobileStepper(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`;
|
|
32021
|
+
return MobileStepper;
|
|
32022
|
+
};
|
|
32023
|
+
|
|
32004
32024
|
const {
|
|
32005
32025
|
useDecorator: useDecorator$1
|
|
32006
32026
|
} = hooks;
|
|
32027
|
+
const MobileInputNumber = withMobileStepper(InputNumber);
|
|
32007
32028
|
const InputNumberFieldInner = props => {
|
|
32008
32029
|
const {
|
|
32009
32030
|
formatMessage
|
|
@@ -32019,7 +32040,7 @@ const InputNumberFieldInner = props => {
|
|
|
32019
32040
|
label: mergedProps.label
|
|
32020
32041
|
})
|
|
32021
32042
|
}, mergedProps));
|
|
32022
|
-
return render(
|
|
32043
|
+
return render(MobileInputNumber);
|
|
32023
32044
|
};
|
|
32024
32045
|
InputNumberFieldInner.Field = InputNumber;
|
|
32025
32046
|
const InputNumberField = withLocale(InputNumberFieldInner);
|