sti-antd-package 0.0.23 → 0.0.24
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.esm.js +4 -3
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, useImperativeHandle, createContext, useContext, useEffect, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, useRef, useCallback, cloneElement, forwardRef, isValidElement, version as version$1 } from 'react';
|
|
2
|
+
import React__default, { useState, useImperativeHandle, createContext, useContext, useEffect, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, useRef, useCallback, memo, cloneElement, forwardRef, isValidElement, version as version$1 } from 'react';
|
|
3
3
|
import { Button, Tooltip, ConfigProvider as ConfigProvider$2, Row, Col, Card, Form as Form$2, Cascader, Checkbox, Skeleton, message, notification, Modal, Spin, Input as Input$2, Space, DatePicker, Dropdown, Radio, Typography, Select, Divider, Flex, Tag, Switch, Table, Drawer, Tabs } from 'antd';
|
|
4
4
|
export { Form } from 'antd';
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
@@ -5345,10 +5345,11 @@ const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing
|
|
|
5345
5345
|
!text && align === 'right' && classNumberFormat.push(styleNumberFormat['number-format-align-right']);
|
|
5346
5346
|
classNames && classNumberFormat.push(...classNames);
|
|
5347
5347
|
return classNumberFormat;
|
|
5348
|
-
}, [classNames, text,
|
|
5348
|
+
}, [classNames, text, align]);
|
|
5349
|
+
const CustomInput = useCallback(memo((props) => (jsxRuntimeExports.jsx(Input$2, Object.assign({}, props, { variant: variant })))), [variant]);
|
|
5349
5350
|
return (jsxRuntimeExports.jsx("div", Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onClick: onClick }, text && align === 'right' && {
|
|
5350
5351
|
style: { textAlign: 'right' }
|
|
5351
|
-
}, { children: jsxRuntimeExports.jsx(NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, customInput:
|
|
5352
|
+
}, { children: jsxRuntimeExports.jsx(NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, customInput: CustomInput, size: size, className: classNumberFormat.join(' '), disabled: disabled, readOnly: readOnly, required: required, allowNegative: allowNegative, displayType: text ? 'text' : undefined, prefix: prefix, suffix: suffix, placeholder: placeholder, decimalScale: trailingProps !== null && trailingProps !== void 0 ? trailingProps : trailing, min: ruleMin, max: ruleMax, value: value !== null && value !== void 0 ? value : valueNumberFormat, onChange: event => {
|
|
5352
5353
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
5353
5354
|
setValueNumberFormat(event.target.value);
|
|
5354
5355
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
package/dist/index.js
CHANGED
|
@@ -5364,10 +5364,11 @@ const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing
|
|
|
5364
5364
|
!text && align === 'right' && classNumberFormat.push(styleNumberFormat['number-format-align-right']);
|
|
5365
5365
|
classNames && classNumberFormat.push(...classNames);
|
|
5366
5366
|
return classNumberFormat;
|
|
5367
|
-
}, [classNames, text,
|
|
5367
|
+
}, [classNames, text, align]);
|
|
5368
|
+
const CustomInput = React.useCallback(React.memo((props) => (jsxRuntimeExports.jsx(antd.Input, Object.assign({}, props, { variant: variant })))), [variant]);
|
|
5368
5369
|
return (jsxRuntimeExports.jsx("div", Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onClick: onClick }, text && align === 'right' && {
|
|
5369
5370
|
style: { textAlign: 'right' }
|
|
5370
|
-
}, { children: jsxRuntimeExports.jsx(reactNumberFormat.NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, customInput:
|
|
5371
|
+
}, { children: jsxRuntimeExports.jsx(reactNumberFormat.NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, customInput: CustomInput, size: size, className: classNumberFormat.join(' '), disabled: disabled, readOnly: readOnly, required: required, allowNegative: allowNegative, displayType: text ? 'text' : undefined, prefix: prefix, suffix: suffix, placeholder: placeholder, decimalScale: trailingProps !== null && trailingProps !== void 0 ? trailingProps : trailing, min: ruleMin, max: ruleMax, value: value !== null && value !== void 0 ? value : valueNumberFormat, onChange: event => {
|
|
5371
5372
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
5372
5373
|
setValueNumberFormat(event.target.value);
|
|
5373
5374
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|