@xaypay/tui 0.1.3 → 0.1.5
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 +37 -34
- package/dist/index.js +37 -34
- package/package.json +1 -1
- package/tui.config.js +3 -6
package/dist/index.es.js
CHANGED
|
@@ -38,7 +38,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
38
38
|
function unsafeStringify(arr, offset = 0) {
|
|
39
39
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
40
40
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
41
|
-
return
|
|
41
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
@@ -958,7 +958,7 @@ const File = ({
|
|
|
958
958
|
setSingleFile(null);
|
|
959
959
|
}
|
|
960
960
|
if (multiple && !removeFile) {
|
|
961
|
-
alert('Please add removeFile prop on
|
|
961
|
+
alert('Please add removeFile prop on File component, it is a require in multiple mode');
|
|
962
962
|
}
|
|
963
963
|
if (maxCHoosenLength) {
|
|
964
964
|
if (typeof maxCHoosenLength !== 'number') {
|
|
@@ -974,7 +974,7 @@ const File = ({
|
|
|
974
974
|
}, [multiple, removeFile, filesArray && filesArray.length, defaultData, maxCHoosenLength]);
|
|
975
975
|
useEffect(() => {
|
|
976
976
|
if (deleteComponent && !removeComponent) {
|
|
977
|
-
alert('Please add removeComponent prop on
|
|
977
|
+
alert('Please add removeComponent prop on File component it is require when deleteComponent prop is true');
|
|
978
978
|
}
|
|
979
979
|
}, [deleteComponent]);
|
|
980
980
|
useEffect(() => {
|
|
@@ -2768,10 +2768,10 @@ const Modal = ({
|
|
|
2768
2768
|
display: 'flex',
|
|
2769
2769
|
alignItems: 'center',
|
|
2770
2770
|
boxSizing: 'border-box',
|
|
2771
|
-
backgroundColor: '#FBFBFB',
|
|
2772
2771
|
padding: padding ?? merge.MODAL.padding,
|
|
2773
2772
|
height: headerHeight ?? merge.MODAL.header.height,
|
|
2774
|
-
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end'
|
|
2773
|
+
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end',
|
|
2774
|
+
backgroundColor: closeAreaBackgroundColor ?? merge.MODAL.closeAreaBackgroundColor
|
|
2775
2775
|
}
|
|
2776
2776
|
}, headerText && type === 'content' && /*#__PURE__*/React__default.createElement("p", {
|
|
2777
2777
|
style: {
|
|
@@ -3010,11 +3010,11 @@ const TelInput = ({
|
|
|
3010
3010
|
type,
|
|
3011
3011
|
value,
|
|
3012
3012
|
radius,
|
|
3013
|
-
inputChange,
|
|
3014
3013
|
isHover,
|
|
3015
3014
|
disabled,
|
|
3016
3015
|
inpStyles,
|
|
3017
3016
|
errorColor,
|
|
3017
|
+
inputChange,
|
|
3018
3018
|
phoneDisplay,
|
|
3019
3019
|
inpAttributes,
|
|
3020
3020
|
phoneAlignItems,
|
|
@@ -3078,6 +3078,7 @@ const TextInput = ({
|
|
|
3078
3078
|
inputChange,
|
|
3079
3079
|
maxLength,
|
|
3080
3080
|
inpStyles,
|
|
3081
|
+
disabled,
|
|
3081
3082
|
inpAttributes
|
|
3082
3083
|
}) => {
|
|
3083
3084
|
const [innerValue, setInnerValue] = useState('');
|
|
@@ -3093,7 +3094,7 @@ const TextInput = ({
|
|
|
3093
3094
|
}
|
|
3094
3095
|
};
|
|
3095
3096
|
useEffect(() => {
|
|
3096
|
-
let newValue =
|
|
3097
|
+
let newValue = '';
|
|
3097
3098
|
if (value !== undefined && value !== null) {
|
|
3098
3099
|
newValue = value;
|
|
3099
3100
|
if (maxLength && value.length > maxLength) {
|
|
@@ -3105,6 +3106,7 @@ const TextInput = ({
|
|
|
3105
3106
|
return /*#__PURE__*/React__default.createElement("input", {
|
|
3106
3107
|
type: "text",
|
|
3107
3108
|
value: innerValue,
|
|
3109
|
+
disabled: disabled,
|
|
3108
3110
|
onInput: handleChange,
|
|
3109
3111
|
name: inpAttributes?.iName,
|
|
3110
3112
|
placeholder: inpAttributes?.placeholder,
|
|
@@ -3125,6 +3127,7 @@ const PassInput = ({
|
|
|
3125
3127
|
inputChange,
|
|
3126
3128
|
maxLength,
|
|
3127
3129
|
inpAttributes,
|
|
3130
|
+
disabled,
|
|
3128
3131
|
inpStyles
|
|
3129
3132
|
}) => {
|
|
3130
3133
|
const [innerShow, setInnerShow] = useState('');
|
|
@@ -3156,6 +3159,7 @@ const PassInput = ({
|
|
|
3156
3159
|
return /*#__PURE__*/React__default.createElement("input", {
|
|
3157
3160
|
type: innerShow ? 'text' : 'password',
|
|
3158
3161
|
value: innerValue,
|
|
3162
|
+
disabled: disabled,
|
|
3159
3163
|
onInput: handleChange,
|
|
3160
3164
|
name: inpAttributes?.iName,
|
|
3161
3165
|
placeholder: inpAttributes?.placeholder,
|
|
@@ -3174,12 +3178,13 @@ const NumberInput = ({
|
|
|
3174
3178
|
value,
|
|
3175
3179
|
float,
|
|
3176
3180
|
radius,
|
|
3177
|
-
|
|
3181
|
+
disabled,
|
|
3178
3182
|
maxLength,
|
|
3179
3183
|
inpStyles,
|
|
3180
|
-
inpAttributes,
|
|
3181
3184
|
minNumSize,
|
|
3182
|
-
maxNumSize
|
|
3185
|
+
maxNumSize,
|
|
3186
|
+
inputChange,
|
|
3187
|
+
inpAttributes
|
|
3183
3188
|
}) => {
|
|
3184
3189
|
const [innerValue, setInnerValue] = useState('');
|
|
3185
3190
|
const [innerMinNumSize, setInnerMinNumSize] = useState(0);
|
|
@@ -3218,6 +3223,7 @@ const NumberInput = ({
|
|
|
3218
3223
|
return /*#__PURE__*/React__default.createElement("input", {
|
|
3219
3224
|
type: "text",
|
|
3220
3225
|
value: innerValue,
|
|
3226
|
+
disabled: disabled,
|
|
3221
3227
|
name: inpAttributes?.iName,
|
|
3222
3228
|
placeholder: inpAttributes?.placeholder,
|
|
3223
3229
|
autoComplete: inpAttributes?.autoComplete,
|
|
@@ -3244,7 +3250,7 @@ const InputTypes = {
|
|
|
3244
3250
|
PASSWORD: 'password'
|
|
3245
3251
|
};
|
|
3246
3252
|
const P = styled.span`
|
|
3247
|
-
animation: ${
|
|
3253
|
+
animation: ${true};
|
|
3248
3254
|
`;
|
|
3249
3255
|
const Input = ({
|
|
3250
3256
|
type,
|
|
@@ -3266,7 +3272,6 @@ const Input = ({
|
|
|
3266
3272
|
leftIcon,
|
|
3267
3273
|
required,
|
|
3268
3274
|
disabled,
|
|
3269
|
-
transform,
|
|
3270
3275
|
iconWidth,
|
|
3271
3276
|
rightIcon,
|
|
3272
3277
|
className,
|
|
@@ -3296,7 +3301,6 @@ const Input = ({
|
|
|
3296
3301
|
errorMarginTop,
|
|
3297
3302
|
boxShadowHover,
|
|
3298
3303
|
errorClassName,
|
|
3299
|
-
errorAnimation,
|
|
3300
3304
|
labelFontFamily,
|
|
3301
3305
|
phoneAlignItems,
|
|
3302
3306
|
errorLineHeight,
|
|
@@ -3309,7 +3313,6 @@ const Input = ({
|
|
|
3309
3313
|
telBorderRightStyle,
|
|
3310
3314
|
telBorderRightColor,
|
|
3311
3315
|
backgroundDisableColor,
|
|
3312
|
-
errorAnimationDuration,
|
|
3313
3316
|
telBorderRightColorHover
|
|
3314
3317
|
}) => {
|
|
3315
3318
|
const [show, setShow] = useState(false);
|
|
@@ -3328,12 +3331,12 @@ const Input = ({
|
|
|
3328
3331
|
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3329
3332
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3330
3333
|
};
|
|
3334
|
+
const uuid = v4();
|
|
3331
3335
|
const inpAttributes = {
|
|
3332
3336
|
placeholder: placeholder ?? '',
|
|
3333
|
-
iName: name ? name : `tui_${
|
|
3337
|
+
iName: name ? name : `tui_${uuid}_tui`,
|
|
3334
3338
|
autoComplete: autoComplete ?? merge.INPUT.autoComplete
|
|
3335
3339
|
};
|
|
3336
|
-
const random = Math.floor(Math.random() * 1000 + 1);
|
|
3337
3340
|
const classProps = classnames(className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
3338
3341
|
const errorShow = keyframes`
|
|
3339
3342
|
100% {
|
|
@@ -3346,7 +3349,7 @@ const Input = ({
|
|
|
3346
3349
|
}
|
|
3347
3350
|
`;
|
|
3348
3351
|
const animation = () => css`
|
|
3349
|
-
${errorShow}
|
|
3352
|
+
${errorShow} 240ms forwards
|
|
3350
3353
|
`;
|
|
3351
3354
|
const handleMouseEnter = () => {
|
|
3352
3355
|
setIsHover(true);
|
|
@@ -3422,9 +3425,10 @@ const Input = ({
|
|
|
3422
3425
|
telBorderRightColorHover: telBorderRightColorHover ?? merge.INPUT.tel.borderRight.colors.hover
|
|
3423
3426
|
}) : type === 'number' ? /*#__PURE__*/React__default.createElement(NumberInput, {
|
|
3424
3427
|
value: value,
|
|
3425
|
-
inputChange: change,
|
|
3426
3428
|
dots: withoutDot,
|
|
3427
3429
|
float: floatToFix,
|
|
3430
|
+
disabled: disabled,
|
|
3431
|
+
inputChange: change,
|
|
3428
3432
|
maxLength: maxLength,
|
|
3429
3433
|
inpStyles: inpStyles,
|
|
3430
3434
|
inpAttributes: inpAttributes,
|
|
@@ -3435,16 +3439,18 @@ const Input = ({
|
|
|
3435
3439
|
show: show,
|
|
3436
3440
|
type: type,
|
|
3437
3441
|
value: value,
|
|
3438
|
-
inputChange: change,
|
|
3439
|
-
isHover: isHover,
|
|
3440
3442
|
disabled: disabled,
|
|
3443
|
+
inputChange: change,
|
|
3444
|
+
maxLength: maxLength,
|
|
3441
3445
|
inpStyles: inpStyles,
|
|
3442
3446
|
inpAttributes: inpAttributes,
|
|
3443
3447
|
radius: radius ?? merge.INPUT.radius
|
|
3444
3448
|
}) : /*#__PURE__*/React__default.createElement(TextInput, {
|
|
3445
3449
|
value: value,
|
|
3450
|
+
disabled: disabled,
|
|
3446
3451
|
inputChange: change,
|
|
3447
3452
|
inpStyles: inpStyles,
|
|
3453
|
+
maxLength: maxLength,
|
|
3448
3454
|
inpAttributes: inpAttributes,
|
|
3449
3455
|
radius: radius ?? merge.INPUT.radius
|
|
3450
3456
|
}), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3463,7 +3469,6 @@ const Input = ({
|
|
|
3463
3469
|
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3464
3470
|
}
|
|
3465
3471
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P, {
|
|
3466
|
-
errorAnimation: errorAnimation ?? merge.INPUT.error.animation,
|
|
3467
3472
|
animation: animation,
|
|
3468
3473
|
style: {
|
|
3469
3474
|
margin: '0px',
|
|
@@ -3478,7 +3483,7 @@ const Input = ({
|
|
|
3478
3483
|
zIndex: errorZindex ?? merge.INPUT.error.zIndex,
|
|
3479
3484
|
lineHeight: errorLineHeight ?? merge.INPUT.error.lineHeight,
|
|
3480
3485
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${merge.INPUT.error.marginTop})`,
|
|
3481
|
-
transform:
|
|
3486
|
+
transform: 'scale3d(1,1,1)'
|
|
3482
3487
|
},
|
|
3483
3488
|
className: errorClassName ?? merge.INPUT.error.className
|
|
3484
3489
|
}, innerErrorMessage) : '');
|
|
@@ -3500,7 +3505,6 @@ Input.propTypes = {
|
|
|
3500
3505
|
padding: PropTypes.string,
|
|
3501
3506
|
tooltip: PropTypes.element,
|
|
3502
3507
|
withoutDot: PropTypes.bool,
|
|
3503
|
-
transform: PropTypes.string,
|
|
3504
3508
|
className: PropTypes.string,
|
|
3505
3509
|
iconWidth: PropTypes.string,
|
|
3506
3510
|
boxSizing: PropTypes.string,
|
|
@@ -3525,7 +3529,6 @@ Input.propTypes = {
|
|
|
3525
3529
|
errorMessage: PropTypes.string,
|
|
3526
3530
|
phoneDisplay: PropTypes.string,
|
|
3527
3531
|
autoComplete: PropTypes.string,
|
|
3528
|
-
errorAnimation: PropTypes.bool,
|
|
3529
3532
|
labelDisplay: PropTypes.string,
|
|
3530
3533
|
errorPosition: PropTypes.string,
|
|
3531
3534
|
errorMarginTop: PropTypes.string,
|
|
@@ -3544,7 +3547,6 @@ Input.propTypes = {
|
|
|
3544
3547
|
telBorderRightColor: PropTypes.string,
|
|
3545
3548
|
phoneJustifyContent: PropTypes.string,
|
|
3546
3549
|
backgroundDisableColor: PropTypes.string,
|
|
3547
|
-
errorAnimationDuration: PropTypes.string,
|
|
3548
3550
|
telBorderRightColorHover: PropTypes.string,
|
|
3549
3551
|
leftIcon: PropTypes.arrayOf(PropTypes.element),
|
|
3550
3552
|
rightIcon: PropTypes.arrayOf(PropTypes.element),
|
|
@@ -5024,7 +5026,7 @@ const Textarea = ({
|
|
|
5024
5026
|
alert('Please add value prop on Textarea component');
|
|
5025
5027
|
}
|
|
5026
5028
|
if (errorMessage) {
|
|
5027
|
-
|
|
5029
|
+
setError(errorMessage);
|
|
5028
5030
|
} else {
|
|
5029
5031
|
setError('');
|
|
5030
5032
|
}
|
|
@@ -5633,12 +5635,10 @@ const Autocomplete = ({
|
|
|
5633
5635
|
value.length > 0 ? setShow(true) : setShow(false);
|
|
5634
5636
|
setInnerError('');
|
|
5635
5637
|
setInnerValue(value);
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
});
|
|
5641
|
-
}
|
|
5638
|
+
change({
|
|
5639
|
+
name: value,
|
|
5640
|
+
id: currentId
|
|
5641
|
+
});
|
|
5642
5642
|
};
|
|
5643
5643
|
const handleClick = selectedValue => {
|
|
5644
5644
|
setShow(false);
|
|
@@ -5740,7 +5740,10 @@ const Autocomplete = ({
|
|
|
5740
5740
|
setInnerError(errorMessage);
|
|
5741
5741
|
}, [errorMessage]);
|
|
5742
5742
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
5743
|
-
className: classProps
|
|
5743
|
+
className: classProps,
|
|
5744
|
+
style: {
|
|
5745
|
+
width: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth
|
|
5746
|
+
}
|
|
5744
5747
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
5745
5748
|
style: {
|
|
5746
5749
|
color: labelColor ?? merge.AUTOCOMPLETE.label.color,
|
|
@@ -5758,7 +5761,7 @@ const Autocomplete = ({
|
|
|
5758
5761
|
style: {
|
|
5759
5762
|
display: contentDisplay ?? merge.AUTOCOMPLETE.parent.display,
|
|
5760
5763
|
position: contentPosition ?? merge.AUTOCOMPLETE.parent.position,
|
|
5761
|
-
|
|
5764
|
+
width: '100%',
|
|
5762
5765
|
flexDirection: contentDirection ?? merge.AUTOCOMPLETE.parent.direction
|
|
5763
5766
|
}
|
|
5764
5767
|
}, /*#__PURE__*/React__default.createElement("input", _extends({
|
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
68
68
|
function unsafeStringify(arr, offset = 0) {
|
|
69
69
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
70
70
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
71
|
-
return
|
|
71
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
@@ -988,7 +988,7 @@ const File = ({
|
|
|
988
988
|
setSingleFile(null);
|
|
989
989
|
}
|
|
990
990
|
if (multiple && !removeFile) {
|
|
991
|
-
alert('Please add removeFile prop on
|
|
991
|
+
alert('Please add removeFile prop on File component, it is a require in multiple mode');
|
|
992
992
|
}
|
|
993
993
|
if (maxCHoosenLength) {
|
|
994
994
|
if (typeof maxCHoosenLength !== 'number') {
|
|
@@ -1004,7 +1004,7 @@ const File = ({
|
|
|
1004
1004
|
}, [multiple, removeFile, filesArray && filesArray.length, defaultData, maxCHoosenLength]);
|
|
1005
1005
|
React.useEffect(() => {
|
|
1006
1006
|
if (deleteComponent && !removeComponent) {
|
|
1007
|
-
alert('Please add removeComponent prop on
|
|
1007
|
+
alert('Please add removeComponent prop on File component it is require when deleteComponent prop is true');
|
|
1008
1008
|
}
|
|
1009
1009
|
}, [deleteComponent]);
|
|
1010
1010
|
React.useEffect(() => {
|
|
@@ -2798,10 +2798,10 @@ const Modal = ({
|
|
|
2798
2798
|
display: 'flex',
|
|
2799
2799
|
alignItems: 'center',
|
|
2800
2800
|
boxSizing: 'border-box',
|
|
2801
|
-
backgroundColor: '#FBFBFB',
|
|
2802
2801
|
padding: padding ?? merge.MODAL.padding,
|
|
2803
2802
|
height: headerHeight ?? merge.MODAL.header.height,
|
|
2804
|
-
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end'
|
|
2803
|
+
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end',
|
|
2804
|
+
backgroundColor: closeAreaBackgroundColor ?? merge.MODAL.closeAreaBackgroundColor
|
|
2805
2805
|
}
|
|
2806
2806
|
}, headerText && type === 'content' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
2807
2807
|
style: {
|
|
@@ -3040,11 +3040,11 @@ const TelInput = ({
|
|
|
3040
3040
|
type,
|
|
3041
3041
|
value,
|
|
3042
3042
|
radius,
|
|
3043
|
-
inputChange,
|
|
3044
3043
|
isHover,
|
|
3045
3044
|
disabled,
|
|
3046
3045
|
inpStyles,
|
|
3047
3046
|
errorColor,
|
|
3047
|
+
inputChange,
|
|
3048
3048
|
phoneDisplay,
|
|
3049
3049
|
inpAttributes,
|
|
3050
3050
|
phoneAlignItems,
|
|
@@ -3108,6 +3108,7 @@ const TextInput = ({
|
|
|
3108
3108
|
inputChange,
|
|
3109
3109
|
maxLength,
|
|
3110
3110
|
inpStyles,
|
|
3111
|
+
disabled,
|
|
3111
3112
|
inpAttributes
|
|
3112
3113
|
}) => {
|
|
3113
3114
|
const [innerValue, setInnerValue] = React.useState('');
|
|
@@ -3123,7 +3124,7 @@ const TextInput = ({
|
|
|
3123
3124
|
}
|
|
3124
3125
|
};
|
|
3125
3126
|
React.useEffect(() => {
|
|
3126
|
-
let newValue =
|
|
3127
|
+
let newValue = '';
|
|
3127
3128
|
if (value !== undefined && value !== null) {
|
|
3128
3129
|
newValue = value;
|
|
3129
3130
|
if (maxLength && value.length > maxLength) {
|
|
@@ -3135,6 +3136,7 @@ const TextInput = ({
|
|
|
3135
3136
|
return /*#__PURE__*/React__default["default"].createElement("input", {
|
|
3136
3137
|
type: "text",
|
|
3137
3138
|
value: innerValue,
|
|
3139
|
+
disabled: disabled,
|
|
3138
3140
|
onInput: handleChange,
|
|
3139
3141
|
name: inpAttributes?.iName,
|
|
3140
3142
|
placeholder: inpAttributes?.placeholder,
|
|
@@ -3155,6 +3157,7 @@ const PassInput = ({
|
|
|
3155
3157
|
inputChange,
|
|
3156
3158
|
maxLength,
|
|
3157
3159
|
inpAttributes,
|
|
3160
|
+
disabled,
|
|
3158
3161
|
inpStyles
|
|
3159
3162
|
}) => {
|
|
3160
3163
|
const [innerShow, setInnerShow] = React.useState('');
|
|
@@ -3186,6 +3189,7 @@ const PassInput = ({
|
|
|
3186
3189
|
return /*#__PURE__*/React__default["default"].createElement("input", {
|
|
3187
3190
|
type: innerShow ? 'text' : 'password',
|
|
3188
3191
|
value: innerValue,
|
|
3192
|
+
disabled: disabled,
|
|
3189
3193
|
onInput: handleChange,
|
|
3190
3194
|
name: inpAttributes?.iName,
|
|
3191
3195
|
placeholder: inpAttributes?.placeholder,
|
|
@@ -3204,12 +3208,13 @@ const NumberInput = ({
|
|
|
3204
3208
|
value,
|
|
3205
3209
|
float,
|
|
3206
3210
|
radius,
|
|
3207
|
-
|
|
3211
|
+
disabled,
|
|
3208
3212
|
maxLength,
|
|
3209
3213
|
inpStyles,
|
|
3210
|
-
inpAttributes,
|
|
3211
3214
|
minNumSize,
|
|
3212
|
-
maxNumSize
|
|
3215
|
+
maxNumSize,
|
|
3216
|
+
inputChange,
|
|
3217
|
+
inpAttributes
|
|
3213
3218
|
}) => {
|
|
3214
3219
|
const [innerValue, setInnerValue] = React.useState('');
|
|
3215
3220
|
const [innerMinNumSize, setInnerMinNumSize] = React.useState(0);
|
|
@@ -3248,6 +3253,7 @@ const NumberInput = ({
|
|
|
3248
3253
|
return /*#__PURE__*/React__default["default"].createElement("input", {
|
|
3249
3254
|
type: "text",
|
|
3250
3255
|
value: innerValue,
|
|
3256
|
+
disabled: disabled,
|
|
3251
3257
|
name: inpAttributes?.iName,
|
|
3252
3258
|
placeholder: inpAttributes?.placeholder,
|
|
3253
3259
|
autoComplete: inpAttributes?.autoComplete,
|
|
@@ -3274,7 +3280,7 @@ const InputTypes = {
|
|
|
3274
3280
|
PASSWORD: 'password'
|
|
3275
3281
|
};
|
|
3276
3282
|
const P = styled__default["default"].span`
|
|
3277
|
-
animation: ${
|
|
3283
|
+
animation: ${true};
|
|
3278
3284
|
`;
|
|
3279
3285
|
const Input = ({
|
|
3280
3286
|
type,
|
|
@@ -3296,7 +3302,6 @@ const Input = ({
|
|
|
3296
3302
|
leftIcon,
|
|
3297
3303
|
required,
|
|
3298
3304
|
disabled,
|
|
3299
|
-
transform,
|
|
3300
3305
|
iconWidth,
|
|
3301
3306
|
rightIcon,
|
|
3302
3307
|
className,
|
|
@@ -3326,7 +3331,6 @@ const Input = ({
|
|
|
3326
3331
|
errorMarginTop,
|
|
3327
3332
|
boxShadowHover,
|
|
3328
3333
|
errorClassName,
|
|
3329
|
-
errorAnimation,
|
|
3330
3334
|
labelFontFamily,
|
|
3331
3335
|
phoneAlignItems,
|
|
3332
3336
|
errorLineHeight,
|
|
@@ -3339,7 +3343,6 @@ const Input = ({
|
|
|
3339
3343
|
telBorderRightStyle,
|
|
3340
3344
|
telBorderRightColor,
|
|
3341
3345
|
backgroundDisableColor,
|
|
3342
|
-
errorAnimationDuration,
|
|
3343
3346
|
telBorderRightColorHover
|
|
3344
3347
|
}) => {
|
|
3345
3348
|
const [show, setShow] = React.useState(false);
|
|
@@ -3358,12 +3361,12 @@ const Input = ({
|
|
|
3358
3361
|
color: innerErrorMessage && errorColor ? errorColor : color ? color : merge.INPUT.color,
|
|
3359
3362
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : merge.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3360
3363
|
};
|
|
3364
|
+
const uuid = v4();
|
|
3361
3365
|
const inpAttributes = {
|
|
3362
3366
|
placeholder: placeholder ?? '',
|
|
3363
|
-
iName: name ? name : `tui_${
|
|
3367
|
+
iName: name ? name : `tui_${uuid}_tui`,
|
|
3364
3368
|
autoComplete: autoComplete ?? merge.INPUT.autoComplete
|
|
3365
3369
|
};
|
|
3366
|
-
const random = Math.floor(Math.random() * 1000 + 1);
|
|
3367
3370
|
const classProps = classnames__default["default"](className ?? merge.INPUT.className, type === 'number' ? styles$7['inp-num'] : '', styles$7['input-wrap']);
|
|
3368
3371
|
const errorShow = styled.keyframes`
|
|
3369
3372
|
100% {
|
|
@@ -3376,7 +3379,7 @@ const Input = ({
|
|
|
3376
3379
|
}
|
|
3377
3380
|
`;
|
|
3378
3381
|
const animation = () => styled.css`
|
|
3379
|
-
${errorShow}
|
|
3382
|
+
${errorShow} 240ms forwards
|
|
3380
3383
|
`;
|
|
3381
3384
|
const handleMouseEnter = () => {
|
|
3382
3385
|
setIsHover(true);
|
|
@@ -3452,9 +3455,10 @@ const Input = ({
|
|
|
3452
3455
|
telBorderRightColorHover: telBorderRightColorHover ?? merge.INPUT.tel.borderRight.colors.hover
|
|
3453
3456
|
}) : type === 'number' ? /*#__PURE__*/React__default["default"].createElement(NumberInput, {
|
|
3454
3457
|
value: value,
|
|
3455
|
-
inputChange: change,
|
|
3456
3458
|
dots: withoutDot,
|
|
3457
3459
|
float: floatToFix,
|
|
3460
|
+
disabled: disabled,
|
|
3461
|
+
inputChange: change,
|
|
3458
3462
|
maxLength: maxLength,
|
|
3459
3463
|
inpStyles: inpStyles,
|
|
3460
3464
|
inpAttributes: inpAttributes,
|
|
@@ -3465,16 +3469,18 @@ const Input = ({
|
|
|
3465
3469
|
show: show,
|
|
3466
3470
|
type: type,
|
|
3467
3471
|
value: value,
|
|
3468
|
-
inputChange: change,
|
|
3469
|
-
isHover: isHover,
|
|
3470
3472
|
disabled: disabled,
|
|
3473
|
+
inputChange: change,
|
|
3474
|
+
maxLength: maxLength,
|
|
3471
3475
|
inpStyles: inpStyles,
|
|
3472
3476
|
inpAttributes: inpAttributes,
|
|
3473
3477
|
radius: radius ?? merge.INPUT.radius
|
|
3474
3478
|
}) : /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
3475
3479
|
value: value,
|
|
3480
|
+
disabled: disabled,
|
|
3476
3481
|
inputChange: change,
|
|
3477
3482
|
inpStyles: inpStyles,
|
|
3483
|
+
maxLength: maxLength,
|
|
3478
3484
|
inpAttributes: inpAttributes,
|
|
3479
3485
|
radius: radius ?? merge.INPUT.radius
|
|
3480
3486
|
}), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -3493,7 +3499,6 @@ const Input = ({
|
|
|
3493
3499
|
backgroundColor: disabled ? '#FBFBFB' : backgroundColor ? backgroundColor : merge.INPUT.colors.background
|
|
3494
3500
|
}
|
|
3495
3501
|
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P, {
|
|
3496
|
-
errorAnimation: errorAnimation ?? merge.INPUT.error.animation,
|
|
3497
3502
|
animation: animation,
|
|
3498
3503
|
style: {
|
|
3499
3504
|
margin: '0px',
|
|
@@ -3508,7 +3513,7 @@ const Input = ({
|
|
|
3508
3513
|
zIndex: errorZindex ?? merge.INPUT.error.zIndex,
|
|
3509
3514
|
lineHeight: errorLineHeight ?? merge.INPUT.error.lineHeight,
|
|
3510
3515
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${merge.INPUT.error.marginTop})`,
|
|
3511
|
-
transform:
|
|
3516
|
+
transform: 'scale3d(1,1,1)'
|
|
3512
3517
|
},
|
|
3513
3518
|
className: errorClassName ?? merge.INPUT.error.className
|
|
3514
3519
|
}, innerErrorMessage) : '');
|
|
@@ -3530,7 +3535,6 @@ Input.propTypes = {
|
|
|
3530
3535
|
padding: PropTypes__default["default"].string,
|
|
3531
3536
|
tooltip: PropTypes__default["default"].element,
|
|
3532
3537
|
withoutDot: PropTypes__default["default"].bool,
|
|
3533
|
-
transform: PropTypes__default["default"].string,
|
|
3534
3538
|
className: PropTypes__default["default"].string,
|
|
3535
3539
|
iconWidth: PropTypes__default["default"].string,
|
|
3536
3540
|
boxSizing: PropTypes__default["default"].string,
|
|
@@ -3555,7 +3559,6 @@ Input.propTypes = {
|
|
|
3555
3559
|
errorMessage: PropTypes__default["default"].string,
|
|
3556
3560
|
phoneDisplay: PropTypes__default["default"].string,
|
|
3557
3561
|
autoComplete: PropTypes__default["default"].string,
|
|
3558
|
-
errorAnimation: PropTypes__default["default"].bool,
|
|
3559
3562
|
labelDisplay: PropTypes__default["default"].string,
|
|
3560
3563
|
errorPosition: PropTypes__default["default"].string,
|
|
3561
3564
|
errorMarginTop: PropTypes__default["default"].string,
|
|
@@ -3574,7 +3577,6 @@ Input.propTypes = {
|
|
|
3574
3577
|
telBorderRightColor: PropTypes__default["default"].string,
|
|
3575
3578
|
phoneJustifyContent: PropTypes__default["default"].string,
|
|
3576
3579
|
backgroundDisableColor: PropTypes__default["default"].string,
|
|
3577
|
-
errorAnimationDuration: PropTypes__default["default"].string,
|
|
3578
3580
|
telBorderRightColorHover: PropTypes__default["default"].string,
|
|
3579
3581
|
leftIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
3580
3582
|
rightIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
@@ -5054,7 +5056,7 @@ const Textarea = ({
|
|
|
5054
5056
|
alert('Please add value prop on Textarea component');
|
|
5055
5057
|
}
|
|
5056
5058
|
if (errorMessage) {
|
|
5057
|
-
|
|
5059
|
+
setError(errorMessage);
|
|
5058
5060
|
} else {
|
|
5059
5061
|
setError('');
|
|
5060
5062
|
}
|
|
@@ -5663,12 +5665,10 @@ const Autocomplete = ({
|
|
|
5663
5665
|
value.length > 0 ? setShow(true) : setShow(false);
|
|
5664
5666
|
setInnerError('');
|
|
5665
5667
|
setInnerValue(value);
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
});
|
|
5671
|
-
}
|
|
5668
|
+
change({
|
|
5669
|
+
name: value,
|
|
5670
|
+
id: currentId
|
|
5671
|
+
});
|
|
5672
5672
|
};
|
|
5673
5673
|
const handleClick = selectedValue => {
|
|
5674
5674
|
setShow(false);
|
|
@@ -5770,7 +5770,10 @@ const Autocomplete = ({
|
|
|
5770
5770
|
setInnerError(errorMessage);
|
|
5771
5771
|
}, [errorMessage]);
|
|
5772
5772
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5773
|
-
className: classProps
|
|
5773
|
+
className: classProps,
|
|
5774
|
+
style: {
|
|
5775
|
+
width: contentTopMaxWidth ?? merge.AUTOCOMPLETE.maxWidth
|
|
5776
|
+
}
|
|
5774
5777
|
}, label ? /*#__PURE__*/React__default["default"].createElement("label", {
|
|
5775
5778
|
style: {
|
|
5776
5779
|
color: labelColor ?? merge.AUTOCOMPLETE.label.color,
|
|
@@ -5788,7 +5791,7 @@ const Autocomplete = ({
|
|
|
5788
5791
|
style: {
|
|
5789
5792
|
display: contentDisplay ?? merge.AUTOCOMPLETE.parent.display,
|
|
5790
5793
|
position: contentPosition ?? merge.AUTOCOMPLETE.parent.position,
|
|
5791
|
-
|
|
5794
|
+
width: '100%',
|
|
5792
5795
|
flexDirection: contentDirection ?? merge.AUTOCOMPLETE.parent.direction
|
|
5793
5796
|
}
|
|
5794
5797
|
}, /*#__PURE__*/React__default["default"].createElement("input", _extends({
|
package/package.json
CHANGED
package/tui.config.js
CHANGED
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
|
|
92
92
|
colors: {
|
|
93
93
|
background: 'white',
|
|
94
|
-
backgroundDisable: presetColors.
|
|
94
|
+
backgroundDisable: presetColors.secondary,
|
|
95
95
|
},
|
|
96
96
|
|
|
97
97
|
font: {...fontObject},
|
|
@@ -111,10 +111,7 @@ export default {
|
|
|
111
111
|
zIndex: '1',
|
|
112
112
|
className: '',
|
|
113
113
|
marginTop: '10px',
|
|
114
|
-
animation: false,
|
|
115
|
-
transform: 'scale3d(0,0,0)',
|
|
116
114
|
lineHeight: '19px',
|
|
117
|
-
animationDuration: '240ms',
|
|
118
115
|
|
|
119
116
|
font: {...fontObject}
|
|
120
117
|
},
|
|
@@ -312,7 +309,7 @@ export default {
|
|
|
312
309
|
colors: {
|
|
313
310
|
hover: '#373538',
|
|
314
311
|
background: presetColors.extraLight,
|
|
315
|
-
backgroundDisable: presetColors.
|
|
312
|
+
backgroundDisable: presetColors.secondary,
|
|
316
313
|
},
|
|
317
314
|
|
|
318
315
|
font: {...fontObject}
|
|
@@ -443,7 +440,7 @@ export default {
|
|
|
443
440
|
},
|
|
444
441
|
|
|
445
442
|
colors: {
|
|
446
|
-
backgroundDisable: presetColors.
|
|
443
|
+
backgroundDisable: presetColors.secondary,
|
|
447
444
|
},
|
|
448
445
|
|
|
449
446
|
label: {
|