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 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, size, validateStatus, status, variant, align]);
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: Input$2, 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
+ }, { 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, size, validateStatus, status, variant, align]);
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: antd.Input, 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
+ }, { 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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sti-antd-package",
3
3
  "description": "STI ANT Design",
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "type": "module",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",