@xaypay/tui 0.1.0 → 0.1.1
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.es.js +15 -18
- package/dist/index.js +15 -18
- package/package.json +1 -1
- package/tui.config.js +0 -1
package/dist/index.es.js
CHANGED
|
@@ -2727,8 +2727,8 @@ const Modal = ({
|
|
|
2727
2727
|
height: height ?? merge.MODAL.height,
|
|
2728
2728
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
2729
2729
|
borderRadius: radius ?? merge.MODAL.radius,
|
|
2730
|
-
maxWidth: mMaxWidth ?? merge.MODAL.
|
|
2731
|
-
maxHeight: mMaxHeight ?? merge.MODAL.
|
|
2730
|
+
maxWidth: mMaxWidth ?? merge.MODAL.maxWidth,
|
|
2731
|
+
maxHeight: mMaxHeight ?? merge.MODAL.maxHeight,
|
|
2732
2732
|
minWidth: type === 'content' ? minWidth ?? merge.MODAL.minWidth : '',
|
|
2733
2733
|
backgroundColor: backgroundColor ?? merge.MODAL.colors.background,
|
|
2734
2734
|
minHeight: type === 'content' ? minHeight ?? merge.MODAL.minHeight : ''
|
|
@@ -2993,7 +2993,6 @@ const Input = ({
|
|
|
2993
2993
|
errorLineHeight,
|
|
2994
2994
|
labelLineHeight,
|
|
2995
2995
|
backgroundColor,
|
|
2996
|
-
telErrorMessage,
|
|
2997
2996
|
labelMarginBottom,
|
|
2998
2997
|
regexpErrorMessage,
|
|
2999
2998
|
phoneJustifyContent,
|
|
@@ -3029,10 +3028,10 @@ const Input = ({
|
|
|
3029
3028
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
3030
3029
|
if (type === 'tel') {
|
|
3031
3030
|
if (!phoneNumberRegex.test(val)) {
|
|
3032
|
-
if (
|
|
3033
|
-
setInnerErrorMessage(
|
|
3034
|
-
}
|
|
3035
|
-
|
|
3031
|
+
if (errorMessage) {
|
|
3032
|
+
setInnerErrorMessage(errorMessage);
|
|
3033
|
+
}
|
|
3034
|
+
if (val !== '') {
|
|
3036
3035
|
val = prevVal;
|
|
3037
3036
|
}
|
|
3038
3037
|
} else {
|
|
@@ -3168,7 +3167,7 @@ const Input = ({
|
|
|
3168
3167
|
}
|
|
3169
3168
|
}
|
|
3170
3169
|
setInnerValue(() => newValue);
|
|
3171
|
-
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage
|
|
3170
|
+
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage]);
|
|
3172
3171
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
3173
3172
|
className: classProps
|
|
3174
3173
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -3340,7 +3339,6 @@ Input.propTypes = {
|
|
|
3340
3339
|
boxShadowHover: PropTypes.string,
|
|
3341
3340
|
errorClassName: PropTypes.string,
|
|
3342
3341
|
labelFontFamily: PropTypes.string,
|
|
3343
|
-
telErrorMessage: PropTypes.string,
|
|
3344
3342
|
backgroundColor: PropTypes.string,
|
|
3345
3343
|
phoneAlignItems: PropTypes.string,
|
|
3346
3344
|
errorLineHeight: PropTypes.string,
|
|
@@ -4824,22 +4822,21 @@ const Textarea = ({
|
|
|
4824
4822
|
}
|
|
4825
4823
|
};
|
|
4826
4824
|
useEffect(() => {
|
|
4827
|
-
if (value === undefined) {
|
|
4828
|
-
alert('Please add value prop on Textarea component');
|
|
4829
|
-
}
|
|
4830
4825
|
if (!onChange) {
|
|
4831
4826
|
alert('Please add onChange function on Textarea component');
|
|
4832
4827
|
}
|
|
4828
|
+
}, [onChange]);
|
|
4829
|
+
useEffect(() => {
|
|
4830
|
+
if (value === undefined) {
|
|
4831
|
+
alert('Please add value prop on Textarea component');
|
|
4832
|
+
}
|
|
4833
4833
|
if (errorMessage) {
|
|
4834
|
-
setError(errorMessage);
|
|
4834
|
+
value === '' ? setError(errorMessage) : setError('');
|
|
4835
4835
|
} else {
|
|
4836
4836
|
setError('');
|
|
4837
4837
|
}
|
|
4838
|
-
if (value === '') {
|
|
4839
|
-
setError('');
|
|
4840
|
-
}
|
|
4841
4838
|
setInnerValue(value);
|
|
4842
|
-
}, [value,
|
|
4839
|
+
}, [value, errorMessage]);
|
|
4843
4840
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
4844
4841
|
style: {
|
|
4845
4842
|
width: width ?? merge.TEXTAREA.width
|
|
@@ -4911,7 +4908,7 @@ const Textarea = ({
|
|
|
4911
4908
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
4912
4909
|
style: {
|
|
4913
4910
|
display: 'inline-block',
|
|
4914
|
-
color: errorColor ?? merge.TEXTAREA.error.
|
|
4911
|
+
color: errorColor ?? merge.TEXTAREA.error.color,
|
|
4915
4912
|
fontSize: errorSize ?? merge.TEXTAREA.error.font.size,
|
|
4916
4913
|
fontStyle: errorStyle ?? merge.TEXTAREA.error.font.style,
|
|
4917
4914
|
fontWeight: errorWeight ?? merge.TEXTAREA.error.font.weight,
|
package/dist/index.js
CHANGED
|
@@ -2757,8 +2757,8 @@ const Modal = ({
|
|
|
2757
2757
|
height: height ?? merge.MODAL.height,
|
|
2758
2758
|
gridTemplateRows: type === 'content' ? 'auto 10fr' : '',
|
|
2759
2759
|
borderRadius: radius ?? merge.MODAL.radius,
|
|
2760
|
-
maxWidth: mMaxWidth ?? merge.MODAL.
|
|
2761
|
-
maxHeight: mMaxHeight ?? merge.MODAL.
|
|
2760
|
+
maxWidth: mMaxWidth ?? merge.MODAL.maxWidth,
|
|
2761
|
+
maxHeight: mMaxHeight ?? merge.MODAL.maxHeight,
|
|
2762
2762
|
minWidth: type === 'content' ? minWidth ?? merge.MODAL.minWidth : '',
|
|
2763
2763
|
backgroundColor: backgroundColor ?? merge.MODAL.colors.background,
|
|
2764
2764
|
minHeight: type === 'content' ? minHeight ?? merge.MODAL.minHeight : ''
|
|
@@ -3023,7 +3023,6 @@ const Input = ({
|
|
|
3023
3023
|
errorLineHeight,
|
|
3024
3024
|
labelLineHeight,
|
|
3025
3025
|
backgroundColor,
|
|
3026
|
-
telErrorMessage,
|
|
3027
3026
|
labelMarginBottom,
|
|
3028
3027
|
regexpErrorMessage,
|
|
3029
3028
|
phoneJustifyContent,
|
|
@@ -3059,10 +3058,10 @@ const Input = ({
|
|
|
3059
3058
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
3060
3059
|
if (type === 'tel') {
|
|
3061
3060
|
if (!phoneNumberRegex.test(val)) {
|
|
3062
|
-
if (
|
|
3063
|
-
setInnerErrorMessage(
|
|
3064
|
-
}
|
|
3065
|
-
|
|
3061
|
+
if (errorMessage) {
|
|
3062
|
+
setInnerErrorMessage(errorMessage);
|
|
3063
|
+
}
|
|
3064
|
+
if (val !== '') {
|
|
3066
3065
|
val = prevVal;
|
|
3067
3066
|
}
|
|
3068
3067
|
} else {
|
|
@@ -3198,7 +3197,7 @@ const Input = ({
|
|
|
3198
3197
|
}
|
|
3199
3198
|
}
|
|
3200
3199
|
setInnerValue(() => newValue);
|
|
3201
|
-
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage
|
|
3200
|
+
}, [type, value, regexp, maxLength, maxNumSize, minNumSize, errorMessage, regexpErrorMessage]);
|
|
3202
3201
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3203
3202
|
className: classProps
|
|
3204
3203
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
@@ -3370,7 +3369,6 @@ Input.propTypes = {
|
|
|
3370
3369
|
boxShadowHover: PropTypes__default["default"].string,
|
|
3371
3370
|
errorClassName: PropTypes__default["default"].string,
|
|
3372
3371
|
labelFontFamily: PropTypes__default["default"].string,
|
|
3373
|
-
telErrorMessage: PropTypes__default["default"].string,
|
|
3374
3372
|
backgroundColor: PropTypes__default["default"].string,
|
|
3375
3373
|
phoneAlignItems: PropTypes__default["default"].string,
|
|
3376
3374
|
errorLineHeight: PropTypes__default["default"].string,
|
|
@@ -4854,22 +4852,21 @@ const Textarea = ({
|
|
|
4854
4852
|
}
|
|
4855
4853
|
};
|
|
4856
4854
|
React.useEffect(() => {
|
|
4857
|
-
if (value === undefined) {
|
|
4858
|
-
alert('Please add value prop on Textarea component');
|
|
4859
|
-
}
|
|
4860
4855
|
if (!onChange) {
|
|
4861
4856
|
alert('Please add onChange function on Textarea component');
|
|
4862
4857
|
}
|
|
4858
|
+
}, [onChange]);
|
|
4859
|
+
React.useEffect(() => {
|
|
4860
|
+
if (value === undefined) {
|
|
4861
|
+
alert('Please add value prop on Textarea component');
|
|
4862
|
+
}
|
|
4863
4863
|
if (errorMessage) {
|
|
4864
|
-
setError(errorMessage);
|
|
4864
|
+
value === '' ? setError(errorMessage) : setError('');
|
|
4865
4865
|
} else {
|
|
4866
4866
|
setError('');
|
|
4867
4867
|
}
|
|
4868
|
-
if (value === '') {
|
|
4869
|
-
setError('');
|
|
4870
|
-
}
|
|
4871
4868
|
setInnerValue(value);
|
|
4872
|
-
}, [value,
|
|
4869
|
+
}, [value, errorMessage]);
|
|
4873
4870
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4874
4871
|
style: {
|
|
4875
4872
|
width: width ?? merge.TEXTAREA.width
|
|
@@ -4941,7 +4938,7 @@ const Textarea = ({
|
|
|
4941
4938
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4942
4939
|
style: {
|
|
4943
4940
|
display: 'inline-block',
|
|
4944
|
-
color: errorColor ?? merge.TEXTAREA.error.
|
|
4941
|
+
color: errorColor ?? merge.TEXTAREA.error.color,
|
|
4945
4942
|
fontSize: errorSize ?? merge.TEXTAREA.error.font.size,
|
|
4946
4943
|
fontStyle: errorStyle ?? merge.TEXTAREA.error.font.style,
|
|
4947
4944
|
fontWeight: errorWeight ?? merge.TEXTAREA.error.font.weight,
|
package/package.json
CHANGED