import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
import { useState, useRef, useEffect, useMemo } from 'react';
import RcInputNumber from 'rc-input-number';
import ExpandLess from '@iam-com/icons/Up';
import Down from '@iam-com/icons/Down';
import Minus from '@iam-com/icons/Minus';
import Plus from '@iam-com/icons/Plus';
import Label from '../Label/index.js';
import HelperText from '../HelperText/index.js';
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
import '../_verture/unsupportedIterableToArray-cb478f24.js';
import '../Help/index.js';
import '../Tooltip/index.js';
import 'rc-tooltip';
import 'rc-tooltip/lib/placements';
import 'clsx';
import '@iam-com/icons/Help';

var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-input-number {\n  font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n  font-size: 14px;\n  font-weight: 400;\n  display: inline-block;\n  width: 100%;\n}\n.paraui-v3-input-number > .input-number-content {\n  border: 1px solid;\n  border-radius: 4px;\n  border-color: rgba(171, 176, 185, 0.4);\n  display: flex;\n  width: 100%;\n  position: relative;\n  background-color: rgb(255, 255, 255);\n}\n.paraui-v3-input-number > .input-number-content:hover {\n  border-color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-before {\n  width: 30px;\n  color: rgb(46, 55, 67);\n  border-right: 1px solid rgba(171, 176, 185, 0.4);\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 4px;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within {\n  width: 100%;\n  position: relative;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component {\n  width: 100%;\n  height: 100%;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  z-index: 1;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input {\n  width: 100%;\n  height: 100%;\n  border: 0;\n  border-radius: 4px;\n  padding: 10px 12px;\n  background: transparent;\n  font-size: 14px;\n  color: rgb(46, 55, 67);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input::-ms-clear {\n  display: none;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input::-ms-reveal {\n  display: none;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component.component-out-of-range > .component-input-wrap > input {\n  color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n  width: 100%;\n  position: absolute;\n  left: 0;\n  top: 0;\n  height: 100%;\n  padding: 0 12px;\n  color: rgba(46, 55, 67, 0.4);\n  cursor: text;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .input-number-label-placeholder > .input-number-required {\n  margin-left: 2px;\n  color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-after {\n  width: 30px;\n  color: rgb(46, 55, 67);\n  border-left: 1px solid rgba(171, 176, 185, 0.4);\n  border-bottom-right-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within {\n  width: calc(100% - 30px);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap {\n  position: absolute;\n  top: 0;\n  right: -30px;\n  width: 30px;\n  height: 100%;\n  border-bottom-right-radius: 4px;\n  border-top-right-radius: 4px;\n  overflow: hidden;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n  line-height: 0;\n  height: 50%;\n  width: 100%;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n  color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n  color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:last-child {\n  border-top: 1px solid;\n  border-color: rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n  line-height: 0;\n  height: 50%;\n  width: 100%;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n  color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n  color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:last-child {\n  border-top: 1px solid;\n  border-color: rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within {\n  width: calc(100% - 60px);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up {\n  position: absolute;\n  left: -30px;\n  top: 0;\n  height: 100%;\n  border-bottom-left-radius: 4px;\n  border-top-left-radius: 4px;\n  overflow: hidden;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .add-btn {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .add-btn:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .add-btn > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 30px;\n  height: 100%;\n  cursor: pointer;\n  background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn:hover > svg {\n  color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn > svg {\n  color: rgba(46, 55, 67, 0.7);\n  font-size: 20px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down {\n  position: absolute;\n  right: -30px;\n  top: 0;\n  height: 100%;\n  border-bottom-right-radius: 4px;\n  border-top-right-radius: 4px;\n  overflow: hidden;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .reduce-btn {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .reduce-btn:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .reduce-btn > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 30px;\n  height: 100%;\n  cursor: pointer;\n  background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn:hover > svg {\n  color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn > svg {\n  color: rgba(46, 55, 67, 0.7);\n  font-size: 20px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-focus > .input-number-content {\n  border-color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-error > .input-number-content {\n  border-color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number.paraui-v3-input-number-error > .input-number-content:hover {\n  border-color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content {\n  background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content:hover {\n  border-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content > .input-number-content-within {\n  cursor: not-allowed;\n  width: 100%;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn {\n  cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn:hover > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn > svg {\n  color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-small > .input-number-content {\n  height: 28px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-small > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n  line-height: 26px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-small.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n  font-size: 13px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-small.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n  font-size: 13px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium > .input-number-content {\n  height: 32px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n  line-height: 30px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n  font-size: 15px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n  font-size: 15px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large > .input-number-content {\n  height: 36px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n  line-height: 34px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n  font-size: 17px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n  font-size: 17px;\n}";
styleInject(css_248z);

var InputNumber = function InputNumber(props) {
  var className = props.className,
    style = props.style,
    step = props.step,
    min = props.min,
    max = props.max,
    _props$size = props.size,
    size = _props$size === void 0 ? 'large' : _props$size,
    _props$placeholder = props.placeholder,
    placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
    _props$label = props.label,
    label = _props$label === void 0 ? '' : _props$label,
    labelTooltip = props.labelTooltip,
    _props$labelMode = props.labelMode,
    labelMode = _props$labelMode === void 0 ? 'outside' : _props$labelMode,
    labelSign = props.labelSign,
    _props$btnMode = props.btnMode,
    btnMode = _props$btnMode === void 0 ? 'tb' : _props$btnMode,
    _props$disabled = props.disabled,
    disabled = _props$disabled === void 0 ? false : _props$disabled,
    _props$readOnly = props.readOnly,
    readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
    _props$disabledAdd = props.disabledAdd,
    disabledAdd = _props$disabledAdd === void 0 ? false : _props$disabledAdd,
    _props$disabledReduce = props.disabledReduce,
    disabledReduce = _props$disabledReduce === void 0 ? false : _props$disabledReduce,
    _props$required = props.required,
    required = _props$required === void 0 ? false : _props$required,
    _props$error = props.error,
    error = _props$error === void 0 ? false : _props$error,
    hideErrorDom = props.hideErrorDom,
    _props$helperText = props.helperText,
    helperText = _props$helperText === void 0 ? '' : _props$helperText,
    _props$keyboard = props.keyboard,
    keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
    _props$autoFocus = props.autoFocus,
    autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
    formatter = props.formatter,
    parser = props.parser,
    value = props.value,
    onChange = props.onChange,
    onEnter = props.onEnter,
    onBlur = props.onBlur,
    onFocus = props.onFocus,
    otherProps = __rest(props, ["className", "style", "step", "min", "max", "size", "placeholder", "label", "labelTooltip", "labelMode", "labelSign", "btnMode", "disabled", "readOnly", "disabledAdd", "disabledReduce", "required", "error", "hideErrorDom", "helperText", "keyboard", "autoFocus", "formatter", "parser", "value", "onChange", "onEnter", "onBlur", "onFocus"]);
  var _useState = useState(false),
    _useState2 = _slicedToArray(_useState, 2),
    focus = _useState2[0],
    setFocus = _useState2[1]; // 是否获取焦点
  var _useState3 = useState(),
    _useState4 = _slicedToArray(_useState3, 2),
    valueCom = _useState4[0],
    setValueCom = _useState4[1];
  var inputRef = useRef(null);
  useEffect(function () {
    if (props.defaultValue !== undefined) setValueCom(props.defaultValue);
  }, []);
  // 监听value
  useEffect(function () {
    if (value !== undefined) {
      setValueCom(value);
    }
  }, [value]);
  var handValue = function handValue() {
    if (props.value === undefined) return valueCom;
    return value;
  };
  var add = function add(e) {
    if (disabled || disabledAdd || readOnly) {
      e.stopPropagation();
    }
  };
  var reduce = function reduce(e) {
    if (disabled || disabledReduce || readOnly) {
      e.stopPropagation();
    }
  };
  var clickPlaceholder = function clickPlaceholder() {
    if (disabled || readOnly) return;
    var dom = inputRef && inputRef.current;
    dom.focus();
  };
  /** 得到焦点 */
  var onFocusCom = function onFocusCom(event) {
    setFocus(true);
    onFocus && onFocus(event);
  };
  /** 失去焦点 */
  var onBlurCom = function onBlurCom(event) {
    setFocus(false);
    onBlur && onBlur(event);
  };
  /** 改变事件 */
  var onChangeCom = function onChangeCom(val) {
    if (props.value === undefined) {
      setValueCom(val);
    }
    onChange && onChange(val);
  };
  /** 外标题 */
  var outSideMemo = useMemo(function () {
    var showTag = Boolean(required || labelSign || label);
    if (labelMode === 'outside' && showTag) {
      var handLabelClass = function handLabelClass() {
        var str = 'input-number-label';
        if (labelTooltip && labelTooltip.className) {
          str += ' ' + labelTooltip.className;
        }
        return str;
      };
      return jsx(Label, Object.assign({
        label: label,
        required: required,
        labelSign: labelSign
      }, labelTooltip, {
        className: handLabelClass()
      }));
    }
    return null;
  }, [labelMode, label, labelSign, required]);
  /** 处理placeholder, 内标题 */
  var handPlaceholderLabel = function handPlaceholderLabel() {
    var val = handValue();
    if (focus || val !== undefined && val !== null) return undefined; // 得到焦点不显示 或者 (存在val值)
    var handPlaceholderCom = function handPlaceholderCom() {
      if (labelMode === 'outside') return placeholder; // 外标题只返回placeholder
      return jsxs(Fragment, {
        children: [label || placeholder, required && jsx("span", Object.assign({
          className: "input-number-required"
        }, {
          children: "*"
        })), labelSign && jsx("span", {
          children: labelSign
        })]
      });
    };
    return jsx("span", Object.assign({
      className: "input-number-label-placeholder",
      onClick: clickPlaceholder
    }, {
      children: handPlaceholderCom()
    }));
  };
  // 后
  var addonAfterDom = function addonAfterDom(bol) {
    if (disabled || readOnly) return undefined;
    // 上下
    if (btnMode === 'tb') {
      if (bol) return jsx("span", Object.assign({
        className: "tb-btn-bottom",
        onMouseDown: reduce
      }, {
        children: jsx(Down, {})
      }));
      return jsx("div", {
        className: "input-number-content-after"
      });
    }
    // 左右
    if (btnMode === 'lr') {
      if (bol) return jsx("span", Object.assign({
        className: "reduce-btn",
        onMouseDown: reduce
      }, {
        children: jsx(Minus, {})
      }));
      return jsx("div", {
        className: "input-number-content-after"
      });
    }
    return undefined;
  };
  // 前
  var addonBeforeDom = function addonBeforeDom(bol) {
    if (disabled || readOnly) return undefined;
    // 上下
    if (btnMode === 'tb') {
      if (bol) return jsx("span", Object.assign({
        className: "tb-btn-top",
        onMouseDown: add
      }, {
        children: jsx(ExpandLess, {})
      }));
      return undefined;
    }
    // 左右
    if (btnMode === 'lr') {
      if (bol) return jsx("span", Object.assign({
        className: "add-btn",
        onMouseDown: add
      }, {
        children: jsx(Plus, {})
      }));
      return jsx("div", {
        className: "input-number-content-before"
      });
    }
    return undefined;
  };
  /** 处理class */
  var handClass = function handClass() {
    var str = $prefixCls + '-input-number';
    if (className) str += ' ' + className;
    if (size) str += " ".concat($prefixCls, "-input-number-").concat(size);
    if (btnMode) str += " ".concat($prefixCls, "-input-number-").concat(btnMode);
    if (focus) str += " ".concat($prefixCls, "-input-number-focus");
    if (disabled) str += " ".concat($prefixCls, "-input-number-disabled");
    if (disabledAdd) str += " ".concat($prefixCls, "-input-number-disabled-add");
    if (disabledReduce) str += " ".concat($prefixCls, "-input-number-disabled-reduce");
    if (error) str += " ".concat($prefixCls, "-input-number-error");
    return str;
  };
  return jsxs("div", Object.assign({
    className: handClass(),
    style: style
  }, {
    children: [outSideMemo, jsxs("div", Object.assign({
      className: "input-number-content"
    }, {
      children: [addonBeforeDom(), jsxs("div", Object.assign({
        className: "input-number-content-within"
      }, {
        children: [jsx(RcInputNumber, Object.assign({
          ref: inputRef,
          step: step,
          min: min,
          max: max,
          keyboard: keyboard,
          disabled: disabled,
          value: handValue(),
          autoFocus: autoFocus,
          readOnly: readOnly,
          formatter: formatter,
          parser: parser,
          prefixCls: $rcPrefixCls,
          upHandler: addonBeforeDom(true),
          downHandler: addonAfterDom(true),
          onChange: onChangeCom,
          onFocus: onFocusCom,
          onBlur: onBlurCom,
          onPressEnter: onEnter
        }, otherProps)), handPlaceholderLabel()]
      })), addonAfterDom()]
    })), jsx(HelperText, {
      className: "input-number-error-text",
      error: error,
      helperText: helperText,
      hideErrorDom: hideErrorDom
    })]
  }));
};

export { InputNumber, InputNumber as default };
