@xaypay/tui 0.0.84 → 0.0.86

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 CHANGED
@@ -1095,12 +1095,14 @@ const Button = ({
1095
1095
  disabled,
1096
1096
  className,
1097
1097
  boxSizing,
1098
+ hoverColor,
1098
1099
  transition,
1099
1100
  contentWidth,
1100
1101
  disabledColor,
1101
1102
  textTransform,
1102
1103
  backgroundColor,
1103
1104
  disabledLineColor,
1105
+ backgroundHoverColor,
1104
1106
  disabledBackgroundColor,
1105
1107
  ...props
1106
1108
  }) => {
@@ -1135,9 +1137,9 @@ const Button = ({
1135
1137
  width: contentWidth ? 'auto' : width ? width : configStyles.BUTTON.width,
1136
1138
  cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.BUTTON.cursor,
1137
1139
  textTransform: textTransform ? textTransform : configStyles.BUTTON.textTransform,
1138
- backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.disabledBackgroundColor : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : '#ffffff' : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor,
1140
+ backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.disabledBackgroundColor : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.backgroundHoverColor : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor,
1139
1141
  boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.disabledLineColor}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor}` : 'none',
1140
- color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.disabledColor : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : color ? color : configStyles.BUTTON.color
1142
+ color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.disabledColor : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.hoverColor : color ? color : configStyles.BUTTON.color
1141
1143
  },
1142
1144
  type: type ? type : configStyles.BUTTON.type,
1143
1145
  disabled: disabled ? disabled : configStyles.BUTTON.disabled,
@@ -1166,12 +1168,14 @@ Button.propTypes = {
1166
1168
  padding: PropTypes.string,
1167
1169
  boxSizing: PropTypes.string,
1168
1170
  className: PropTypes.string,
1171
+ hoverColor: PropTypes.string,
1169
1172
  transition: PropTypes.string,
1170
1173
  contentWidth: PropTypes.bool,
1171
1174
  textTransform: PropTypes.string,
1172
1175
  disabledColor: PropTypes.string,
1173
1176
  backgroundColor: PropTypes.string,
1174
1177
  disabledLineColor: PropTypes.string,
1178
+ backgroundHoverColor: PropTypes.string,
1175
1179
  disabledBackgroundColor: PropTypes.string
1176
1180
  };
1177
1181
 
@@ -1194,7 +1198,7 @@ const SvgArrow = ({
1194
1198
  fill: fillColor ? fillColor : '#3C393E'
1195
1199
  }));
1196
1200
 
1197
- var css_248z$9 = ".select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:9}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
1201
+ var css_248z$9 = ".select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:10}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
1198
1202
  var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L"};
1199
1203
  styleInject(css_248z$9);
1200
1204
 
@@ -1403,6 +1407,9 @@ const Select = ({
1403
1407
  }, /*#__PURE__*/React__default.createElement("div", {
1404
1408
  className: `${styles$7['select-content-top-text']}`,
1405
1409
  style: {
1410
+ whiteSpace: 'nowrap',
1411
+ overflow: 'hidden',
1412
+ textOverflow: 'ellipsis',
1406
1413
  color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
1407
1414
  }
1408
1415
  }, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
@@ -3880,7 +3887,10 @@ const NewAutocomplete = ({
3880
3887
  id: currentId
3881
3888
  });
3882
3889
  } else {
3883
- change('');
3890
+ change({
3891
+ name: '',
3892
+ id: ''
3893
+ });
3884
3894
  }
3885
3895
  };
3886
3896
  const handleClick = selectedValue => {
@@ -3952,8 +3962,8 @@ const NewAutocomplete = ({
3952
3962
  alert('Please add options prop');
3953
3963
  }
3954
3964
  options && options.length > 0 && options.map(item => {
3955
- if (!item.hasOwnProperty('name')) {
3956
- alert('Please add name property in items of options array');
3965
+ if (!item.hasOwnProperty(keyNames.name)) {
3966
+ alert(`Please add ${keyNames.name} property in items of options array`);
3957
3967
  }
3958
3968
  });
3959
3969
  if (!getItem) {
@@ -3974,7 +3984,7 @@ const NewAutocomplete = ({
3974
3984
  setId('');
3975
3985
  setInnerValue('');
3976
3986
  }
3977
- }, [selected]);
3987
+ }, []);
3978
3988
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label ? /*#__PURE__*/React__default.createElement("label", {
3979
3989
  style: {
3980
3990
  color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
package/dist/index.js CHANGED
@@ -1125,12 +1125,14 @@ const Button = ({
1125
1125
  disabled,
1126
1126
  className,
1127
1127
  boxSizing,
1128
+ hoverColor,
1128
1129
  transition,
1129
1130
  contentWidth,
1130
1131
  disabledColor,
1131
1132
  textTransform,
1132
1133
  backgroundColor,
1133
1134
  disabledLineColor,
1135
+ backgroundHoverColor,
1134
1136
  disabledBackgroundColor,
1135
1137
  ...props
1136
1138
  }) => {
@@ -1165,9 +1167,9 @@ const Button = ({
1165
1167
  width: contentWidth ? 'auto' : width ? width : configStyles.BUTTON.width,
1166
1168
  cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.BUTTON.cursor,
1167
1169
  textTransform: textTransform ? textTransform : configStyles.BUTTON.textTransform,
1168
- backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.disabledBackgroundColor : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : '#ffffff' : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor,
1170
+ backgroundColor: (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.disabledBackgroundColor : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.backgroundHoverColor : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor,
1169
1171
  boxShadow: outline ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.disabledLineColor}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor}` : 'none',
1170
- color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.disabledColor : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : color ? color : configStyles.BUTTON.color
1172
+ color: (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.disabledColor : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.hoverColor : color ? color : configStyles.BUTTON.color
1171
1173
  },
1172
1174
  type: type ? type : configStyles.BUTTON.type,
1173
1175
  disabled: disabled ? disabled : configStyles.BUTTON.disabled,
@@ -1196,12 +1198,14 @@ Button.propTypes = {
1196
1198
  padding: PropTypes__default["default"].string,
1197
1199
  boxSizing: PropTypes__default["default"].string,
1198
1200
  className: PropTypes__default["default"].string,
1201
+ hoverColor: PropTypes__default["default"].string,
1199
1202
  transition: PropTypes__default["default"].string,
1200
1203
  contentWidth: PropTypes__default["default"].bool,
1201
1204
  textTransform: PropTypes__default["default"].string,
1202
1205
  disabledColor: PropTypes__default["default"].string,
1203
1206
  backgroundColor: PropTypes__default["default"].string,
1204
1207
  disabledLineColor: PropTypes__default["default"].string,
1208
+ backgroundHoverColor: PropTypes__default["default"].string,
1205
1209
  disabledBackgroundColor: PropTypes__default["default"].string
1206
1210
  };
1207
1211
 
@@ -1224,7 +1228,7 @@ const SvgArrow = ({
1224
1228
  fill: fillColor ? fillColor : '#3C393E'
1225
1229
  }));
1226
1230
 
1227
- var css_248z$9 = ".select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:9}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
1231
+ var css_248z$9 = ".select-module_select-content__GCMDX{display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:10}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto;padding:0 5px 0 20px}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:14px;justify-content:center;width:14px}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
1228
1232
  var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L"};
1229
1233
  styleInject(css_248z$9);
1230
1234
 
@@ -1433,6 +1437,9 @@ const Select = ({
1433
1437
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1434
1438
  className: `${styles$7['select-content-top-text']}`,
1435
1439
  style: {
1440
+ whiteSpace: 'nowrap',
1441
+ overflow: 'hidden',
1442
+ textOverflow: 'ellipsis',
1436
1443
  color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor
1437
1444
  }
1438
1445
  }, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
@@ -3910,7 +3917,10 @@ const NewAutocomplete = ({
3910
3917
  id: currentId
3911
3918
  });
3912
3919
  } else {
3913
- change('');
3920
+ change({
3921
+ name: '',
3922
+ id: ''
3923
+ });
3914
3924
  }
3915
3925
  };
3916
3926
  const handleClick = selectedValue => {
@@ -3982,8 +3992,8 @@ const NewAutocomplete = ({
3982
3992
  alert('Please add options prop');
3983
3993
  }
3984
3994
  options && options.length > 0 && options.map(item => {
3985
- if (!item.hasOwnProperty('name')) {
3986
- alert('Please add name property in items of options array');
3995
+ if (!item.hasOwnProperty(keyNames.name)) {
3996
+ alert(`Please add ${keyNames.name} property in items of options array`);
3987
3997
  }
3988
3998
  });
3989
3999
  if (!getItem) {
@@ -4004,7 +4014,7 @@ const NewAutocomplete = ({
4004
4014
  setId('');
4005
4015
  setInnerValue('');
4006
4016
  }
4007
- }, [selected]);
4017
+ }, []);
4008
4018
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
4009
4019
  style: {
4010
4020
  color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.0.84",
3
+ "version": "0.0.86",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -22,12 +22,14 @@ export const Button = ({
22
22
  disabled,
23
23
  className,
24
24
  boxSizing,
25
+ hoverColor,
25
26
  transition,
26
27
  contentWidth,
27
28
  disabledColor,
28
29
  textTransform,
29
30
  backgroundColor,
30
31
  disabledLineColor,
32
+ backgroundHoverColor,
31
33
  disabledBackgroundColor,
32
34
  ...props
33
35
  }) => {
@@ -73,7 +75,9 @@ export const Button = ({
73
75
  textTransform: textTransform ? textTransform : configStyles.BUTTON.textTransform,
74
76
  backgroundColor:
75
77
  (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.disabledBackgroundColor :
76
- outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : '#ffffff' : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor,
78
+ outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : '#ffffff' :
79
+ !outline && !disabled && isHover? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.backgroundHoverColor :
80
+ backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor,
77
81
  boxShadow:
78
82
  outline ?
79
83
  disabled ?
@@ -82,7 +86,9 @@ export const Button = ({
82
86
  'none',
83
87
  color:
84
88
  (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.disabledColor :
85
- outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor : color ? color : configStyles.BUTTON.color
89
+ outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.backgroundColor :
90
+ !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.hoverColor :
91
+ color ? color : configStyles.BUTTON.color
86
92
  }}
87
93
  type={type ? type : configStyles.BUTTON.type}
88
94
  disabled={disabled ? disabled : configStyles.BUTTON.disabled}
@@ -116,11 +122,13 @@ Button.propTypes = {
116
122
  padding: PropTypes.string,
117
123
  boxSizing: PropTypes.string,
118
124
  className: PropTypes.string,
125
+ hoverColor: PropTypes.string,
119
126
  transition: PropTypes.string,
120
127
  contentWidth: PropTypes.bool,
121
128
  textTransform: PropTypes.string,
122
129
  disabledColor: PropTypes.string,
123
130
  backgroundColor: PropTypes.string,
124
131
  disabledLineColor: PropTypes.string,
132
+ backgroundHoverColor: PropTypes.string,
125
133
  disabledBackgroundColor: PropTypes.string
126
134
  };
@@ -28,7 +28,7 @@ const Template = (args) => {
28
28
  method: 'GET',
29
29
  headers: {
30
30
  'Content-Type': 'application/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rgc6pEhqW8f0oO-9Wk',
32
32
  },
33
33
  }).then((res)=> {
34
34
  return res.json()
@@ -42,11 +42,11 @@ const Template = (args) => {
42
42
  });
43
43
  };
44
44
 
45
- return <NewAutocomplete {...args} getItem={handleClick} options={newOptions} change={handleChange} />
45
+ return <NewAutocomplete {...args} getItem={handleClick} selected={{ "bbb":"0", "name":"gasdfgdsfgdsg" }} options={newOptions} change={handleChange} />
46
46
  };
47
47
  export const Default = Template.bind({});
48
48
  Default.args = {
49
49
  searchCount: 3,
50
50
  keyNames: { name: 'name', id: 'bbb' },
51
- selected: { "bbb":"0", "name":"gasdfgdsfgdsg" },
51
+ selected: { "bbb":"0", "name":"gasdfgdsfgdsg" }
52
52
  }
@@ -131,7 +131,7 @@ export const NewAutocomplete = ({
131
131
  if (value.length >= searchCount) {
132
132
  change({ name: value, id: currentId });
133
133
  } else {
134
- change('');
134
+ change({ name: '', id: '' });
135
135
  }
136
136
  };
137
137
 
@@ -244,8 +244,8 @@ export const NewAutocomplete = ({
244
244
  }
245
245
 
246
246
  options && options.length > 0 && options.map(item => {
247
- if (!item.hasOwnProperty('name')) {
248
- alert('Please add name property in items of options array');
247
+ if (!item.hasOwnProperty(keyNames.name)) {
248
+ alert(`Please add ${keyNames.name} property in items of options array`);
249
249
  }
250
250
  });
251
251
 
@@ -270,7 +270,7 @@ export const NewAutocomplete = ({
270
270
  setId('');
271
271
  setInnerValue('');
272
272
  }
273
- }, [selected]);
273
+ }, []);
274
274
 
275
275
  return (
276
276
  <>
@@ -243,6 +243,9 @@ export const Select = ({
243
243
  <div
244
244
  className={`${styles['select-content-top-text']}`}
245
245
  style={{
246
+ whiteSpace: 'nowrap',
247
+ overflow: 'hidden',
248
+ textOverflow: 'ellipsis',
246
249
  color: errorMessage ? errorColor ? errorColor : configStyles.SELECT.errorColor : isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selectedHoverColor : selectedColor ? selectedColor : configStyles.SELECT.selectedColor,
247
250
  }}
248
251
  >
@@ -16,7 +16,7 @@
16
16
  position: absolute;
17
17
  width: 100%;
18
18
  left: 0px;
19
- z-index: 9;
19
+ z-index: 10;
20
20
  max-height: 0;
21
21
  overflow: hidden;
22
22
  animation: select-show 640ms linear forwards;
@@ -144,6 +144,8 @@ import StackAlt from './assets/stackalt.svg';
144
144
  disabledLineColor: 'rgba(60, 57, 62, 1)', // for border color (outline) in disabled mode
145
145
  disabledBackgroundColor: 'rgba(238, 238, 238, 1)', // for background color in disabled mode
146
146
  transition: 'background-color 240ms, color 240ms', // for transition
147
+ hoverColor: '#001745', // for hover color
148
+ backgroundHoverColor: '#CB3A3A' // for hover background color
147
149
  }
148
150
  ```
149
151
 
@@ -420,9 +422,11 @@ import StackAlt from './assets/stackalt.svg';
420
422
  minWidth: '200px', // for minimum width
421
423
  maxWidth: '500px', // for maximum width
422
424
  labelSize: '16px', // for label font size
425
+ errorSize: '12px', // for error font size
423
426
  minHeight: '100px', // for minimum height
424
427
  maxHeight: '300px', // for maximum height
425
428
  padding: '12px 15px', // for padding
429
+ errorColor: '#E40E00', // for error color
426
430
  labelColor: '#3C393E', // for label color
427
431
  labelWeight: 'normal', // for label font weight
428
432
  labelDisplay: 'block', // for label display
package/tui.config.js CHANGED
@@ -21,6 +21,8 @@ module.exports = {
21
21
  disabledLineColor: 'rgba(60, 57, 62, 1)', // for border color (outline) in disabled mode
22
22
  disabledBackgroundColor: 'rgba(238, 238, 238, 1)', // for background color in disabled mode
23
23
  transition: 'background-color 240ms, color 240ms', // for transition
24
+ hoverColor: '#001745', // for hover color
25
+ backgroundHoverColor: '#CB3A3A' // for hover background color
24
26
  },
25
27
  // default properties for <Input /> component
26
28
  INPUT: {
@@ -335,12 +337,11 @@ module.exports = {
335
337
  height: '200px', // for file choose place height
336
338
  color: '#3C393E', // for file place color
337
339
  upload: 'Բեռնել', // for file place text
338
- maxWidth: '440px', // for file width
340
+ maxWidth: '440px', // for file width
339
341
  labelSize: '16px', // for file font size
340
342
  border: '2px dashed', // for file choose place border
341
- errorColor: '#ee0000', // for file error message color
342
343
  labelColor: '#4A4A4D', // for file color
343
- errorColor: '#ee0000', // for file place error color
344
+ errorColor: '#ee0000', // for file place and error message error color
344
345
  borderColor: '#D1D1D1', // for file choose place border color
345
346
  listItemHeight: '70px', // for file list item height
346
347
  uploadColor: '#0DA574', // for file place upload text color