@xaypay/tui 0.0.104 → 0.0.106

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.
Files changed (92) hide show
  1. package/.eslintrc.js +30 -0
  2. package/.husky/pre-commit +4 -0
  3. package/.prettierrc +10 -0
  4. package/.storybook/main.js +42 -45
  5. package/.storybook/preview.js +7 -7
  6. package/cli-command.js +1 -1
  7. package/dist/index.es.js +183 -152
  8. package/dist/index.js +183 -152
  9. package/package.json +16 -4
  10. package/rollup.config.js +11 -11
  11. package/src/assets_old/icons/demo-files/demo.js +16 -18
  12. package/src/components/autocomplate/autocomplate.stories.js +30 -28
  13. package/src/components/autocomplate/index.js +145 -127
  14. package/src/components/button/button.stories.js +6 -6
  15. package/src/components/button/index.js +176 -126
  16. package/src/components/captcha/captcha.stories.js +12 -8
  17. package/src/components/captcha/index.js +47 -50
  18. package/src/components/checkbox/checkbox.stories.js +7 -7
  19. package/src/components/checkbox/index.js +77 -93
  20. package/src/components/file/file.stories.js +15 -15
  21. package/src/components/file/index.js +114 -116
  22. package/src/components/icon/Arrow.js +18 -18
  23. package/src/components/icon/CaptchaArrowDown.js +18 -18
  24. package/src/components/icon/CaptchaArrowUp.js +18 -18
  25. package/src/components/icon/CheckboxChecked.js +20 -20
  26. package/src/components/icon/CheckboxUnchecked.js +20 -20
  27. package/src/components/icon/Close.js +18 -18
  28. package/src/components/icon/CloseIcon.js +18 -18
  29. package/src/components/icon/CloseSlide.js +18 -18
  30. package/src/components/icon/DeleteComponent.js +19 -19
  31. package/src/components/icon/Dots.js +18 -18
  32. package/src/components/icon/HeartFilled.js +22 -23
  33. package/src/components/icon/HeartOutline.js +22 -22
  34. package/src/components/icon/Icon.js +3 -5
  35. package/src/components/icon/ListItemDelete.js +18 -18
  36. package/src/components/icon/ListItemJpeg.js +20 -20
  37. package/src/components/icon/ListItemJpg.js +20 -20
  38. package/src/components/icon/ListItemPdf.js +20 -20
  39. package/src/components/icon/ListItemPng.js +20 -20
  40. package/src/components/icon/Next.js +19 -19
  41. package/src/components/icon/Nextarrow.js +18 -18
  42. package/src/components/icon/PDF.js +18 -18
  43. package/src/components/icon/Prev.js +19 -19
  44. package/src/components/icon/RangeArrowDefault.js +41 -52
  45. package/src/components/icon/RangeArrowError.js +41 -52
  46. package/src/components/icon/RangeArrowSuccess.js +41 -52
  47. package/src/components/icon/RemoveFile.js +19 -19
  48. package/src/components/icon/ToasterClose.js +18 -18
  49. package/src/components/icon/ToasterError.js +18 -18
  50. package/src/components/icon/ToasterInfo.js +18 -18
  51. package/src/components/icon/ToasterSuccess.js +18 -18
  52. package/src/components/icon/ToasterWarning.js +18 -18
  53. package/src/components/icon/Tooltip.js +18 -18
  54. package/src/components/icon/Upload.js +24 -24
  55. package/src/components/input/index.js +267 -224
  56. package/src/components/input/input.stories.js +20 -21
  57. package/src/components/modal/index.js +172 -157
  58. package/src/components/modal/modal.stories.js +79 -78
  59. package/src/components/newAutocomplete/NewAutocomplete.stories.js +93 -51
  60. package/src/components/newAutocomplete/index.js +342 -216
  61. package/src/components/newFile/fileItem.js +213 -191
  62. package/src/components/newFile/index.js +231 -173
  63. package/src/components/newFile/newFile.stories.js +32 -35
  64. package/src/components/pagination/index.js +95 -126
  65. package/src/components/pagination/pagination.stories.js +363 -365
  66. package/src/components/pagination/paginationRange.js +42 -67
  67. package/src/components/radio/index.js +49 -62
  68. package/src/components/radio/radio.stories.js +7 -7
  69. package/src/components/select/index.js +316 -221
  70. package/src/components/select/select.stories.js +25 -14
  71. package/src/components/singleCheckbox/Checkbox.js +53 -0
  72. package/src/components/singleCheckbox/index.js +36 -36
  73. package/src/components/singleCheckbox/singleCheckbox.stories.js +21 -7
  74. package/src/components/stepper/index.js +35 -30
  75. package/src/components/stepper/stepper.stories.js +11 -11
  76. package/src/components/table/index.js +280 -148
  77. package/src/components/table/table.stories.js +105 -217
  78. package/src/components/table/td.js +80 -72
  79. package/src/components/table/th.js +19 -16
  80. package/src/components/textarea/index.js +86 -62
  81. package/src/components/textarea/textarea.stories.js +10 -13
  82. package/src/components/toaster/Toast.js +177 -159
  83. package/src/components/toaster/index.js +107 -111
  84. package/src/components/toaster/toaster.stories.js +582 -367
  85. package/src/components/tooltip/index.js +79 -46
  86. package/src/components/tooltip/tooltip.stories.js +9 -10
  87. package/src/components/typography/index.js +108 -101
  88. package/src/components/typography/typography.stories.js +16 -19
  89. package/src/index.js +20 -20
  90. package/src/stories/configuration.stories.mdx +9 -0
  91. package/src/utils/index.js +11 -11
  92. package/tui.config.js +345 -338
package/dist/index.es.js CHANGED
@@ -77,11 +77,9 @@ const File = ({
77
77
  required,
78
78
  disabled,
79
79
  onChange,
80
- className,
81
80
  defaultData,
82
81
  errorMessage,
83
- fileExtensions,
84
- ...props
82
+ fileExtensions
85
83
  }) => {
86
84
  const [error, setError] = useState('');
87
85
  const [fileName, setFileName] = useState('no selected file');
@@ -127,13 +125,13 @@ const File = ({
127
125
  target: null
128
126
  });
129
127
  setFileName('no selected file');
130
- document.querySelector(`.${name}`).value = "";
128
+ document.querySelector(`.${name}`).value = '';
131
129
  };
132
130
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
133
131
  className: `${styles$c['file-form-title']} ile-form-title-rem`
134
132
  }, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
135
133
  style: {
136
- color: "#ee0000"
134
+ color: '#ee0000'
137
135
  }
138
136
  }, "*")), /*#__PURE__*/React__default.createElement("div", {
139
137
  className: classnames(`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
@@ -190,6 +188,29 @@ File.defaultProps = {
190
188
  fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
191
189
  };
192
190
 
191
+ const _ = require('lodash');
192
+ const compereConfigs = () => {
193
+ let projectConfig = {};
194
+ let packageConfig = {};
195
+ try {
196
+ packageConfig = require('../tui.config.js');
197
+ } catch (e) {
198
+ try {
199
+ packageConfig = require('../../tui.config.js');
200
+ } catch (err) {
201
+ packageConfig = {};
202
+ }
203
+ }
204
+ try {
205
+ projectConfig = require('../../../../tui.config.js');
206
+ } catch (error) {
207
+ projectConfig = {};
208
+ // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
209
+ }
210
+
211
+ return _.merge(packageConfig, projectConfig);
212
+ };
213
+
193
214
  const SvgCheckboxUnchecked = ({
194
215
  title,
195
216
  titleId,
@@ -232,17 +253,24 @@ const SvgCheckboxChecked = ({
232
253
  fill: fillColor ? fillColor : '#00236A'
233
254
  }));
234
255
 
235
- const SingleCheckbox = ({
236
- id,
237
- float,
256
+ const Checkbox$1 = ({
257
+ data,
258
+ styles,
238
259
  checked,
239
- onClick,
240
- content,
241
260
  disabled,
242
261
  checkedColor,
262
+ handleChecked,
243
263
  unCheckedColor
244
264
  }) => {
245
- const [innerCheckd, setInnerChecked] = useState(false);
265
+ const configStyles = compereConfigs();
266
+ const [innerChecked, setInnerChecked] = useState(false);
267
+ const [innerDisabled, setInnerDisabled] = useState(false);
268
+ const handleClick = e => {
269
+ handleChecked(data, e);
270
+ };
271
+ useEffect(() => {
272
+ setInnerDisabled(disabled);
273
+ }, [disabled]);
246
274
  useEffect(() => {
247
275
  setInnerChecked(checked);
248
276
  }, [checked]);
@@ -252,48 +280,61 @@ const SingleCheckbox = ({
252
280
  height: '16px',
253
281
  marginRight: '9px',
254
282
  display: 'inline-block',
255
- float: float ? float : '',
256
- cursor: !disabled && onClick ? 'pointer' : 'normal'
257
- }
258
- }, innerCheckd ? /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
259
- onClick: !disabled && onClick ? e => onClick(e, content, id) : _ => _,
260
- fillColor: checkedColor ? checkedColor : ''
283
+ cursor: !innerDisabled ? 'pointer' : 'not-allowed',
284
+ ...styles
285
+ },
286
+ onClick: !innerDisabled && handleChecked ? handleClick : _ => _
287
+ }, innerChecked && !innerDisabled ? /*#__PURE__*/React__default.createElement(SvgCheckboxChecked, {
288
+ fillColor: checkedColor ? checkedColor : configStyles.SINGLECHECKBOX.checkedColor
261
289
  }) : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
262
- onClick: !disabled && onClick ? e => onClick(e, content, id) : _ => _,
263
- fillColor: unCheckedColor ? unCheckedColor : ''
264
- }));
290
+ fillColor: unCheckedColor ? unCheckedColor : configStyles.SINGLECHECKBOX.unCheckedColor
291
+ }), data?.label && /*#__PURE__*/React__default.createElement("span", null, data.label));
292
+ };
293
+
294
+ const SingleCheckbox = ({
295
+ data,
296
+ styles,
297
+ checked,
298
+ disabled,
299
+ checkedColor,
300
+ handleChecked,
301
+ unCheckedColor
302
+ }) => {
303
+ const [innerData, setInnerData] = useState(null);
304
+ useEffect(() => {
305
+ // if (data) {
306
+ // if (typeof data === 'object' && data.constructor === Object) {
307
+ // setInnerData(data);
308
+ // } else {
309
+ // alert('Data props on Checkbox component must be an object');
310
+ // }
311
+ // } else {
312
+ // alert('Please add data props on Checkbox component');
313
+ // }
314
+ setInnerData(data);
315
+ }, [data]);
316
+ return /*#__PURE__*/React__default.createElement(Checkbox$1, {
317
+ styles: styles,
318
+ data: innerData,
319
+ checked: checked,
320
+ disabled: disabled,
321
+ checkedColor: checkedColor,
322
+ handleChecked: handleChecked,
323
+ unCheckedColor: unCheckedColor
324
+ });
265
325
  };
266
326
  SingleCheckbox.propTypes = {
327
+ data: PropTypes.object,
328
+ onClick: PropTypes.func,
329
+ styles: PropTypes.object,
267
330
  disabled: PropTypes.bool,
268
- checked: PropTypes.bool.isRequired
331
+ checkedColor: PropTypes.string,
332
+ unCheckedColor: PropTypes.string
269
333
  };
270
334
 
271
335
  var css_248z$e = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{cursor:pointer;display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}";
272
336
  styleInject(css_248z$e);
273
337
 
274
- const _ = require('lodash');
275
- const compereConfigs = () => {
276
- let projectConfig = {};
277
- let packageConfig = {};
278
- try {
279
- packageConfig = require('../tui.config.js');
280
- } catch (e) {
281
- try {
282
- packageConfig = require('../../tui.config.js');
283
- } catch (err) {
284
- packageConfig = {};
285
- }
286
- }
287
- try {
288
- projectConfig = require('../../../../tui.config.js');
289
- } catch (error) {
290
- projectConfig = {};
291
- // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
292
- }
293
-
294
- return _.merge(packageConfig, projectConfig);
295
- };
296
-
297
338
  ({
298
339
  dataBody: PropTypes.array,
299
340
  dataHeader: PropTypes.array,
@@ -310,10 +351,13 @@ const compereConfigs = () => {
310
351
  tBodyFontWeight: PropTypes.string,
311
352
  tBodyFontFamily: PropTypes.string,
312
353
  tBodyRowBorder: PropTypes.string,
313
- handleCheckedBody: PropTypes.func,
314
- handleCheckedHeader: PropTypes.func,
315
- handleHeaderItemClick: PropTypes.func,
316
- handleBodyActionClick: PropTypes.func
354
+ // handleCheckedBody: PropTypes.func,
355
+ // handleCheckedHeader: PropTypes.func,
356
+ // handleHeaderItemClick: PropTypes.func,
357
+ // handleBodyActionClick: PropTypes.func
358
+
359
+ setTableDataBody: PropTypes.func,
360
+ setTableDataHeader: PropTypes.func
317
361
  });
318
362
 
319
363
  var css_248z$d = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
@@ -434,7 +478,8 @@ const Modal = ({
434
478
  justifyContent,
435
479
  backgroundColor,
436
480
  grayDecorHeight,
437
- layerBackgroundColor
481
+ layerBackgroundColor,
482
+ imageWrapHeight
438
483
  }) => {
439
484
  const [select, setSelect] = useState(0);
440
485
  const [innerData, setInnerData] = useState([]);
@@ -607,18 +652,22 @@ const Modal = ({
607
652
  }
608
653
  }, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
609
654
  style: {
610
- height: '100%'
655
+ width: '100%',
656
+ height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
611
657
  }
612
658
  }, innerData && innerData.length > 0 && innerData.map((item, index) => {
613
659
  if (select === index) {
660
+ // eslint-disable-next-line no-prototype-builtins
614
661
  if (!item.hasOwnProperty('url')) {
615
662
  alert('Please add url property in data prop on each element');
616
663
  } else {
617
664
  return /*#__PURE__*/React__default.createElement("img", {
618
665
  style: {
666
+ display: 'block',
619
667
  objectFit: 'cover',
620
668
  objectPosition: 'center',
621
669
  borderRadius: radius ? radius : configStyles.MODAL.radius,
670
+ width: imageWidth ? imageWidth : configStyles.MODAL.imageWidth,
622
671
  height: imageHeight ? imageHeight : configStyles.MODAL.imageHeight
623
672
  },
624
673
  src: item.url,
@@ -627,7 +676,7 @@ const Modal = ({
627
676
  }
628
677
  }
629
678
  }), innerData && innerData.length > 1 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
630
- onClick: _ => handleGoTo('prev'),
679
+ onClick: () => handleGoTo('prev'),
631
680
  style: {
632
681
  position: 'absolute',
633
682
  left: '14px',
@@ -641,7 +690,7 @@ const Modal = ({
641
690
  backgroundColor: 'transparent'
642
691
  }
643
692
  }, /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
644
- onClick: _ => handleGoTo('next'),
693
+ onClick: () => handleGoTo('next'),
645
694
  style: {
646
695
  position: 'absolute',
647
696
  width: '24px',
@@ -696,9 +745,9 @@ styleInject(css_248z$c);
696
745
 
697
746
  const InputTypes = {
698
747
  TEL: 'tel',
699
- TEXT: "text",
748
+ TEXT: 'text',
700
749
  NUMBER: 'number',
701
- PASSWORD: "password"
750
+ PASSWORD: 'password'
702
751
  };
703
752
  const P = styled.span`
704
753
  animation: ${props => props.errorAnimation ? props.animation : 'none'};
@@ -744,7 +793,6 @@ const Input = ({
744
793
  errorMessage,
745
794
  autoComplete,
746
795
  labelDisplay,
747
- errorPosition,
748
796
  boxShadowHover,
749
797
  errorClassName,
750
798
  errorAnimation,
@@ -780,7 +828,7 @@ const Input = ({
780
828
  -o-transform: scale3d(1,1,1);
781
829
  }
782
830
  `;
783
- const animation = _ => css`
831
+ const animation = () => css`
784
832
  ${errorShow} ${errorAnimationDuration ? errorAnimationDuration : configStyles.INPUT.errorAnimationDuration} forwards
785
833
  `;
786
834
  const handleChange = event => {
@@ -1031,9 +1079,9 @@ const Input = ({
1031
1079
  }
1032
1080
  }, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage, telErrorMessage]);
1033
1081
  return /*#__PURE__*/React__default.createElement("div", {
1034
- className: `${styles$a["input-wrap"]}`
1082
+ className: `${styles$a['input-wrap']}`
1035
1083
  }, label ? /*#__PURE__*/React__default.createElement("label", {
1036
- className: `${styles$a["input-title"]}`,
1084
+ className: `${styles$a['input-title']}`,
1037
1085
  style: {
1038
1086
  color: labelColor ? labelColor : configStyles.INPUT.labelColor,
1039
1087
  fontSize: labelSize ? labelSize : configStyles.INPUT.labelSize,
@@ -1044,10 +1092,10 @@ const Input = ({
1044
1092
  }
1045
1093
  }, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
1046
1094
  style: {
1047
- color: errorColor ? errorColor : "#ee0000"
1095
+ color: errorColor ? errorColor : '#ee0000'
1048
1096
  }
1049
1097
  }, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
1050
- className: `${styles$a["input-content"]}`,
1098
+ className: `${styles$a['input-content']}`,
1051
1099
  style: {
1052
1100
  width: width ? width : configStyles.INPUT.width,
1053
1101
  borderRadius: radius ? radius : configStyles.INPUT.radius,
@@ -1091,7 +1139,7 @@ const Input = ({
1091
1139
  value: innerValue,
1092
1140
  className: classProps,
1093
1141
  onInput: handleChange,
1094
- disabled: disabled ? disabled : "",
1142
+ disabled: disabled ? disabled : '',
1095
1143
  name: name ? name : `tui_${random}_tui`,
1096
1144
  placeholder: placeholder ? placeholder : '',
1097
1145
  type: show || type === 'number' ? 'text' : type,
@@ -1203,7 +1251,7 @@ Input.propTypes = {
1203
1251
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
1204
1252
  };
1205
1253
  Input.defaultProps = {
1206
- type: "text"
1254
+ type: 'text'
1207
1255
  };
1208
1256
 
1209
1257
  var css_248z$b = ".radio-module_radio-wrap__-lO7V{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.radio-module_radio-wrap__-lO7V>input{height:0;opacity:0;position:absolute;width:0}.radio-module_radio-wrap__-lO7V .radio-module_radio-checkmark__Kvol0{border:1px solid #d9d9d9;border-radius:50%;display:inline-block;height:14px;left:0;margin-right:4px;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.radio-module_radio-wrap__-lO7V>.radio-module_radio-checkmark__Kvol0:after{background-color:#d9d9d9;border-radius:50%;bottom:0;content:\"\";height:8px;left:0;margin:auto;opacity:0;position:absolute;right:0;top:0;transition:opacity .24s,background-color .24s;width:8px}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0:after{background-color:#1890ff;opacity:1}.radio-module_radio-wrap__-lO7V:hover input~.radio-module_radio-checkmark__Kvol0:after{opacity:1}.radio-module_radio-wrap__-lO7V input:checked~.radio-module_radio-checkmark__Kvol0{border-color:#1890ff}";
@@ -1219,28 +1267,27 @@ const Radio = ({
1219
1267
  value,
1220
1268
  jsonData,
1221
1269
  label,
1222
- keyNames,
1223
1270
  ...props
1224
1271
  }) => {
1225
1272
  const classProps = classnames(styles$9.checkbox, className);
1226
1273
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
1227
1274
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parseData.map((element, id) => {
1228
1275
  return /*#__PURE__*/React__default.createElement("label", {
1229
- className: `${styles$9["radio-wrap"]} radio-wrap-rem`,
1276
+ className: `${styles$9['radio-wrap']} radio-wrap-rem`,
1230
1277
  key: element.value
1231
1278
  }, /*#__PURE__*/React__default.createElement("input", _extends({
1232
1279
  type: "radio",
1233
1280
  className: classProps,
1234
1281
  disabled: disabled,
1235
1282
  required: required,
1236
- defaultChecked: id === 0 ? defaultChecked : "",
1283
+ defaultChecked: id === 0 ? defaultChecked : '',
1237
1284
  value: value ? value : element.value,
1238
1285
  name: name ? name : element.name
1239
1286
  }, props)), /*#__PURE__*/React__default.createElement("span", {
1240
- className: `${styles$9["radio-checkmark"]} radio-checkmark-rem`
1287
+ className: `${styles$9['radio-checkmark']} radio-checkmark-rem`
1241
1288
  }), element.label ? /*#__PURE__*/React__default.createElement("span", {
1242
1289
  className: styles$9.labelRadio
1243
- }, label ? label : element.label) : "");
1290
+ }, label ? label : element.label) : '');
1244
1291
  }));
1245
1292
  };
1246
1293
  Radio.propTypes = {
@@ -1262,6 +1309,7 @@ Radio.defaultProps = {
1262
1309
 
1263
1310
  const Button = ({
1264
1311
  icon,
1312
+ hoverIcon,
1265
1313
  size,
1266
1314
  type,
1267
1315
  font,
@@ -1328,21 +1376,22 @@ const Button = ({
1328
1376
  },
1329
1377
  type: type ? type : configStyles.BUTTON.type,
1330
1378
  disabled: disabled ? disabled : configStyles.BUTTON.disabled,
1331
- onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : _ => alert('Add click event handler on Button component') : _ => _,
1379
+ onClick: disabled ? _ => _ : type !== 'submit' ? onClick ? onClick : () => alert('Add click event handler on Button component') : _ => _,
1332
1380
  onMouseEnter: handleMouseEnter,
1333
1381
  onMouseLeave: handleMouseLeave,
1334
1382
  className: classProps
1335
- }, props), icon && icon, " ", label && /*#__PURE__*/React__default.createElement("span", {
1383
+ }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
1336
1384
  style: {
1337
1385
  marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.btnIconMarginRight : '0px'
1338
1386
  }
1339
- }, label), " ", !icon && !label && 'Add icon or label prop on Button component');
1387
+ }, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
1340
1388
  };
1341
1389
  Button.propTypes = {
1342
1390
  type: PropTypes.string,
1343
1391
  size: PropTypes.string,
1344
1392
  font: PropTypes.string,
1345
1393
  icon: PropTypes.element,
1394
+ hoverIcon: PropTypes.element,
1346
1395
  color: PropTypes.string,
1347
1396
  width: PropTypes.string,
1348
1397
  outline: PropTypes.bool,
@@ -1513,6 +1562,7 @@ const Select = ({
1513
1562
  };
1514
1563
  const isObjectEmpty = obj => {
1515
1564
  for (var key in obj) {
1565
+ // eslint-disable-next-line no-prototype-builtins
1516
1566
  if (obj.hasOwnProperty(key)) {
1517
1567
  return false;
1518
1568
  }
@@ -1526,9 +1576,9 @@ const Select = ({
1526
1576
  setOpened(false);
1527
1577
  }
1528
1578
  };
1529
- document.addEventListener("mousedown", checkIfClickedOutside);
1579
+ document.addEventListener('mousedown', checkIfClickedOutside);
1530
1580
  return () => {
1531
- document.removeEventListener("mousedown", checkIfClickedOutside);
1581
+ document.removeEventListener('mousedown', checkIfClickedOutside);
1532
1582
  };
1533
1583
  }
1534
1584
  }, [opened]);
@@ -1543,7 +1593,7 @@ const Select = ({
1543
1593
  if (!multiple) {
1544
1594
  options && options.length > 0 && setExistOptions(options);
1545
1595
  } else {
1546
- const modifiedOptions = options && options.length > 0 && options.map((item, index) => {
1596
+ const modifiedOptions = options && options.length > 0 && options.map(item => {
1547
1597
  item.checked = false;
1548
1598
  if (selected && selected.length > 0) {
1549
1599
  selected.map(innerItem => {
@@ -1574,9 +1624,9 @@ const Select = ({
1574
1624
  }
1575
1625
  }, label, required && /*#__PURE__*/React__default.createElement("sup", {
1576
1626
  style: {
1577
- color: "#ee0000"
1627
+ color: '#ee0000'
1578
1628
  }
1579
- }, "*")) : "", /*#__PURE__*/React__default.createElement("div", {
1629
+ }, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
1580
1630
  ref: ref
1581
1631
  }, /*#__PURE__*/React__default.createElement("div", {
1582
1632
  className: styles$8['select-content']
@@ -1594,9 +1644,9 @@ const Select = ({
1594
1644
  backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selectedDisableBackgroundColor : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selectedBackgroundColor,
1595
1645
  boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.SELECT.errorColor}` : isHover ? boxShadowHover ? boxShadowHover : configStyles.SELECT.boxShadowHover : boxShadow ? boxShadow : configStyles.SELECT.boxShadow
1596
1646
  },
1597
- onClick: disabled ? _ => _ : _ => handleOpenClose(),
1598
- onMouseEnter: disabled ? _ => _ : _ => handleMouseEnter(),
1599
- onMouseLeave: disabled ? _ => _ : _ => handleMouseLeave(),
1647
+ onClick: disabled ? _ => _ : () => handleOpenClose(),
1648
+ onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
1649
+ onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
1600
1650
  className: `${styles$8['select-content-top']}`
1601
1651
  }, /*#__PURE__*/React__default.createElement("div", {
1602
1652
  className: `${styles$8['select-content-top-text']}`,
@@ -1642,7 +1692,7 @@ const Select = ({
1642
1692
  key: i,
1643
1693
  disabled: true,
1644
1694
  defaultValue: option[keyNames.id],
1645
- onClick: disabled ? _ => _ : _ => handleSelectItem(option),
1695
+ onClick: disabled ? _ => _ : () => handleSelectItem(option),
1646
1696
  onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
1647
1697
  onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
1648
1698
  className: `${styles$8['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$8['ellipsis'] : ''}`,
@@ -1957,6 +2007,7 @@ Toast.defaultProps = {
1957
2007
  let toastify;
1958
2008
  let path = window.location.href;
1959
2009
  const removeToast = ref => {
2010
+ // eslint-disable-next-line react/no-find-dom-node
1960
2011
  const node = ReactDOM.findDOMNode(ref.current);
1961
2012
  const removeElem = node.parentNode;
1962
2013
  const parent = removeElem.parentNode;
@@ -2131,7 +2182,7 @@ const Tooltip = ({
2131
2182
  const handleShow = () => {
2132
2183
  setShowTooltip(!showTooltip);
2133
2184
  };
2134
- useEffect(_ => {
2185
+ useEffect(() => {
2135
2186
  if (!text) {
2136
2187
  alert('Add text on tooltip');
2137
2188
  }
@@ -2309,7 +2360,6 @@ const Captcha = ({
2309
2360
  right: '0px',
2310
2361
  width: '100%',
2311
2362
  height: '4px',
2312
- borderRadius: '2px',
2313
2363
  backgroundColor: '#EEEEEE',
2314
2364
  borderRadius: '10px',
2315
2365
  zIndex: -2
@@ -2341,7 +2391,6 @@ const Captcha = ({
2341
2391
  height: '4px',
2342
2392
  borderRadius: '2px',
2343
2393
  backgroundColor: +rangeProgress === rangeNumber ? '#0DA574' : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? '#EE0000' : 'transparent',
2344
- borderRadius: '2px',
2345
2394
  zIndex: -1
2346
2395
  }
2347
2396
  })), /*#__PURE__*/React__default.createElement("div", {
@@ -2365,12 +2414,9 @@ var styles$4 = {"stepper-container":"stepper-module_stepper-container__-OVGy","b
2365
2414
  styleInject(css_248z$6);
2366
2415
 
2367
2416
  const Stepper = ({
2368
- className,
2369
- onChange,
2370
2417
  stepLength,
2371
2418
  activeSteps
2372
2419
  }) => {
2373
- classnames(className, 'stepper-inner-rem');
2374
2420
  return /*#__PURE__*/React__default.createElement("div", {
2375
2421
  className: `${styles$4['stepper-container']} stepper-container-rem`
2376
2422
  }, (() => {
@@ -2381,7 +2427,7 @@ const Stepper = ({
2381
2427
  key: step
2382
2428
  }, /*#__PURE__*/React__default.createElement("div", {
2383
2429
  className: classnames(`${step <= activeSteps ? styles$4.smallActiveRing : styles$4.smallRing}`)
2384
- }, step <= activeSteps ? step : "")));
2430
+ }, step <= activeSteps ? step : '')));
2385
2431
  }
2386
2432
  return steppers;
2387
2433
  })());
@@ -2426,7 +2472,7 @@ for (let i = 0; i < 256; ++i) {
2426
2472
  function unsafeStringify(arr, offset = 0) {
2427
2473
  // Note: Be careful editing this code! It's been tuned for performance
2428
2474
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
2429
- 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]]).toLowerCase();
2475
+ 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]];
2430
2476
  }
2431
2477
 
2432
2478
  const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
@@ -2561,6 +2607,7 @@ const SvgListItemDelete = ({
2561
2607
  fill: fillColor ? fillColor : '#051942'
2562
2608
  }));
2563
2609
 
2610
+ // eslint-disable-next-line react/display-name
2564
2611
  const FileItem = /*#__PURE__*/React__default.memo(({
2565
2612
  size,
2566
2613
  name,
@@ -2852,6 +2899,7 @@ const NewFile = ({
2852
2899
  const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf' : null : null);
2853
2900
  const configStyles = compereConfigs();
2854
2901
  const handleRemoveComponent = () => {
2902
+ // eslint-disable-next-line react/no-find-dom-node
2855
2903
  const node = ReactDOM.findDOMNode(ref.current);
2856
2904
  const parent = node.parentNode;
2857
2905
  parent.removeChild(node);
@@ -3072,7 +3120,7 @@ const NewFile = ({
3072
3120
  style: {
3073
3121
  margin: '0px'
3074
3122
  }
3075
- }, putFileHere ? putFileHere : configStyles.File.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : configStyles.File.or, " ", /*#__PURE__*/React__default.createElement("span", {
3123
+ }, putFileHere ? putFileHere : configStyles.File.putFileHere, /*#__PURE__*/React__default.createElement("br", null), or ? or : configStyles.File.or, ' ', /*#__PURE__*/React__default.createElement("span", {
3076
3124
  style: {
3077
3125
  color: uploadColor ? uploadColor : configStyles.File.uploadColor
3078
3126
  }
@@ -3084,7 +3132,7 @@ const NewFile = ({
3084
3132
  style: {
3085
3133
  margin: '0px'
3086
3134
  }
3087
- }, fileSizeText ? fileSizeText : configStyles.File.fileSizeText, " ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default.createElement("div", {
3135
+ }, fileSizeText ? fileSizeText : configStyles.File.fileSizeText, " ", maxSize, "\u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default.createElement("div", {
3088
3136
  style: {
3089
3137
  position: 'absolute',
3090
3138
  top: '0px',
@@ -3124,7 +3172,7 @@ const NewFile = ({
3124
3172
  name: item.file.name,
3125
3173
  removeFile: removeFile ? removeFile : _ => _,
3126
3174
  radius: radius ? radius : configStyles.File.radius,
3127
- fileFormat: item.file.type.split('/')[1].toLowerCase(),
3175
+ fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
3128
3176
  progressColor: progressColor ? progressColor : configStyles.File.progressColor,
3129
3177
  listItemHeight: listItemHeight ? listItemHeight : configStyles.File.listItemHeight,
3130
3178
  listItemPadding: listItemPadding ? listItemPadding : configStyles.File.listItemPadding,
@@ -3205,11 +3253,8 @@ const Checkbox = ({
3205
3253
  disabled,
3206
3254
  required,
3207
3255
  className,
3208
- name,
3209
- value,
3210
3256
  jsonData,
3211
3257
  onChange,
3212
- label,
3213
3258
  keyNames,
3214
3259
  onClick,
3215
3260
  ...props
@@ -3247,7 +3292,7 @@ const Checkbox = ({
3247
3292
  } : '';
3248
3293
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, data.map(element => {
3249
3294
  return /*#__PURE__*/React__default.createElement("label", {
3250
- className: `${styles$3["checkbox-wrap"]} checkbox-wrap-rem`,
3295
+ className: `${styles$3['checkbox-wrap']} checkbox-wrap-rem`,
3251
3296
  key: element.value
3252
3297
  }, /*#__PURE__*/React__default.createElement("input", _extends({
3253
3298
  type: "checkbox",
@@ -3261,11 +3306,11 @@ const Checkbox = ({
3261
3306
  onClick: onClick ? onClick : () => {},
3262
3307
  defaultChecked: element.checked
3263
3308
  }, props)), /*#__PURE__*/React__default.createElement("span", {
3264
- className: `${styles$3["checkmark"]} checkmark-rem`
3309
+ className: `${styles$3['checkmark']} checkmark-rem`
3265
3310
  }), element[keyNames.label] ? /*#__PURE__*/React__default.createElement("label", {
3266
3311
  className: styles$3.labelCheckbox,
3267
- for: element[keyNames.id]
3268
- }, element[keyNames.label]) : "");
3312
+ htmlFor: element[keyNames.id]
3313
+ }, element[keyNames.label]) : '');
3269
3314
  }));
3270
3315
  };
3271
3316
  Checkbox.propTypes = {
@@ -3547,7 +3592,7 @@ const Typography = ({
3547
3592
  return validVariant ? 'Please set Typography valid variant' : tagT;
3548
3593
  };
3549
3594
  Typography.propTypes = {
3550
- size: PropTypes.string,
3595
+ size: PropTypes.oneOf(PropTypes.string, PropTypes.number),
3551
3596
  color: PropTypes.string,
3552
3597
  onClick: PropTypes.func,
3553
3598
  weight: PropTypes.string,
@@ -3574,9 +3619,7 @@ var css_248z$2 = ".pagination-module_listItem__b1-WN:focus{background-color:#4ca
3574
3619
  var styles$2 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
3575
3620
  styleInject(css_248z$2);
3576
3621
 
3577
- // import styles from "./pagination.module.scss";
3578
-
3579
- const Dots = "...";
3622
+ const Dots = '...';
3580
3623
  const range = (start, end) => {
3581
3624
  const length = end - start + 1;
3582
3625
  return Array.from({
@@ -3584,41 +3627,36 @@ const range = (start, end) => {
3584
3627
  }, (_, idx) => idx + start);
3585
3628
  };
3586
3629
  const PaginationRange = ({
3587
- currentTotalCount,
3588
3630
  offset,
3589
- siblingCountNumber,
3631
+ currentTotalCount,
3590
3632
  currentPageNumber
3591
3633
  }) => {
3592
3634
  const paginationRange = useMemo(() => {
3635
+ const firstPageIndex = 1;
3593
3636
  const totalPageCount = Math.ceil(currentTotalCount / offset);
3594
-
3595
- //currentPage + 2*Dots + start + end = 5
3596
- const totalPageNumber = siblingCountNumber + 5;
3597
- if (totalPageNumber >= totalPageCount) {
3637
+ const lastPageIndex = totalPageCount;
3638
+ if (7 >= totalPageCount) {
3598
3639
  return range(1, totalPageCount);
3599
3640
  }
3600
- const rightSiblingIndex = Math.min(currentPageNumber + siblingCountNumber, totalPageCount);
3601
- const leftSiblingIndex = Math.max(currentPageNumber - siblingCountNumber, 1);
3641
+ const leftSiblingIndex = Math.max(currentPageNumber - 1, 1);
3642
+ const rightSiblingIndex = Math.min(currentPageNumber + 1, totalPageCount);
3602
3643
  const shouldShowLeftDots = leftSiblingIndex > 2;
3603
3644
  const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
3604
- const firstPageIndex = 1;
3605
- const lastPageIndex = totalPageCount;
3606
3645
  if (!shouldShowLeftDots && shouldShowRightDots) {
3607
- let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
3646
+ let leftItemCount = currentPageNumber === 4 && lastPageIndex >= 7 ? 5 : 4;
3608
3647
  let leftRange = range(1, leftItemCount);
3609
3648
  return [...leftRange, Dots, totalPageCount];
3610
- }
3611
- if (shouldShowLeftDots && !shouldShowRightDots) {
3612
- let rightItemCount = 0;
3613
- currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
3649
+ } else if (shouldShowLeftDots && !shouldShowRightDots) {
3650
+ let rightItemCount = currentPageNumber === lastPageIndex - 3 && lastPageIndex >= 7 ? 4 : 3;
3614
3651
  let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
3615
3652
  return [firstPageIndex, Dots, ...rightRange];
3616
- }
3617
- if (shouldShowLeftDots && shouldShowRightDots) {
3653
+ } else if (shouldShowLeftDots && shouldShowRightDots) {
3618
3654
  let middleRange = range(leftSiblingIndex, rightSiblingIndex);
3619
3655
  return [firstPageIndex, Dots, ...middleRange, Dots, lastPageIndex];
3656
+ } else {
3657
+ return range(firstPageIndex, totalPageCount);
3620
3658
  }
3621
- }, [currentTotalCount, offset, siblingCountNumber, currentPageNumber]);
3659
+ }, [currentTotalCount, offset, currentPageNumber]);
3622
3660
  return paginationRange;
3623
3661
  };
3624
3662
 
@@ -3662,24 +3700,19 @@ const SvgNextarrow = ({
3662
3700
 
3663
3701
  const Pagination = ({
3664
3702
  goTo,
3703
+ offset,
3665
3704
  onChange,
3705
+ className,
3666
3706
  totalCount,
3667
- siblingCount,
3668
- currentPage,
3669
- offset,
3670
- className
3707
+ currentPage
3671
3708
  }) => {
3672
3709
  const [inpVal, setInpVal] = useState('');
3673
3710
  const [error, setError] = useState(false);
3674
- const [siblingCountNumber, setSibilingCountNumber] = useState(siblingCount);
3675
3711
  const [currentPageNumber, setCurrentPage] = useState(currentPage);
3676
3712
  const [currentTotalCount, setcurrentTotalCount] = useState(totalCount);
3677
3713
  useEffect(() => {
3678
3714
  setcurrentTotalCount(totalCount);
3679
3715
  }, [totalCount]);
3680
- useEffect(() => {
3681
- setSibilingCountNumber(siblingCount);
3682
- }, [siblingCount]);
3683
3716
  useEffect(() => {
3684
3717
  setCurrentPage(currentPage);
3685
3718
  }, [currentPage]);
@@ -3694,13 +3727,12 @@ const Pagination = ({
3694
3727
  const paginationRange = PaginationRange({
3695
3728
  currentPageNumber,
3696
3729
  currentTotalCount,
3697
- siblingCountNumber,
3698
3730
  offset
3699
3731
  });
3700
- if (currentPageNumber === 0 || paginationRange.length < 2) {
3732
+ if (currentPageNumber === 0 || paginationRange?.length < 2) {
3701
3733
  return null;
3702
3734
  }
3703
- const classProps = classnames(styles$2.list, className ? className : `${styles$2["pagination-bar"]} pagination-bar-rem`);
3735
+ const classProps = classnames(styles$2.list, className ? className : `${styles$2['pagination-bar']} pagination-bar-rem`);
3704
3736
  const onNext = () => {
3705
3737
  onPageChange(currentPageNumber + 1);
3706
3738
  };
@@ -3710,7 +3742,7 @@ const Pagination = ({
3710
3742
  const onNextFive = () => {
3711
3743
  currentPageNumber !== lastPage - 4 ? onPageChange(currentPageNumber + 5) : onPageChange(currentPageNumber + 4);
3712
3744
  };
3713
- const onPreviousFive = e => {
3745
+ const onPreviousFive = () => {
3714
3746
  currentPageNumber !== 5 ? onPageChange(currentPageNumber - 5) : onPageChange(currentPageNumber - 4);
3715
3747
  };
3716
3748
  const handleChangeInput = e => {
@@ -3727,7 +3759,7 @@ const Pagination = ({
3727
3759
  }
3728
3760
  };
3729
3761
  const handleKeyDown = e => {
3730
- const forbiddenKeys = ["e", ".", "+", "-"];
3762
+ const forbiddenKeys = ['e', '.', '+', '-'];
3731
3763
  if (forbiddenKeys.includes(e.key)) {
3732
3764
  e.preventDefault();
3733
3765
  }
@@ -3763,37 +3795,37 @@ const Pagination = ({
3763
3795
  },
3764
3796
  onClick: onPrevious,
3765
3797
  disabled: currentPageNumber === 1 ? true : false,
3766
- className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3798
+ className: `${styles$2['pagination-btn']} pagination-btn-rem`
3767
3799
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
3768
3800
  if (pageNumber === Dots) {
3769
3801
  let currentPageIndex = paginationRange.indexOf(currentPageNumber);
3770
3802
  return /*#__PURE__*/React__default.createElement("li", {
3771
3803
  key: id,
3772
- className: classnames(`${styles$2["pagination-jump-next"]} pagination-jump-next-rem`, styles$2.listItem),
3804
+ className: classnames(`${styles$2['pagination-jump-next']} pagination-jump-next-rem`, styles$2.listItem),
3773
3805
  onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
3774
3806
  disabled: currentPageIndex === 0 ? true : false
3775
3807
  }, id < currentPageIndex ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
3776
- className: `${styles$2["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
3808
+ className: `${styles$2['pagination-jump-next-txt']} pagination-jump-next-txt-rem`
3777
3809
  }, /*#__PURE__*/React__default.createElement(SvgDots, null)), /*#__PURE__*/React__default.createElement("span", {
3778
- className: `${styles$2["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`,
3810
+ className: `${styles$2['pagination-jump-next-arrow']} pagination-jump-next-arrow-rem`,
3779
3811
  style: {
3780
3812
  transform: 'rotate(180deg)'
3781
3813
  }
3782
3814
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
3783
- className: `${styles$2["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
3815
+ className: `${styles$2['pagination-jump-next-txt']} pagination-jump-next-txt-rem`
3784
3816
  }, /*#__PURE__*/React__default.createElement(SvgDots, null)), /*#__PURE__*/React__default.createElement("span", {
3785
- className: `${styles$2["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
3817
+ className: `${styles$2['pagination-jump-next-arrow']} pagination-jump-next-arrow-rem`
3786
3818
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))));
3787
3819
  }
3788
3820
  return /*#__PURE__*/React__default.createElement("li", {
3789
3821
  onClick: () => onPageChange(pageNumber),
3790
3822
  key: id,
3791
- className: classnames(`${pageNumber === currentPageNumber ? styles$2.selected : styles$2.listItem}`, `${styles$2["pagination-item"]} pagination-item-rem`)
3823
+ className: classnames(`${pageNumber === currentPageNumber ? styles$2.selected : styles$2.listItem}`, `${styles$2['pagination-item']} pagination-item-rem`)
3792
3824
  }, pageNumber);
3793
3825
  }), /*#__PURE__*/React__default.createElement("button", {
3794
3826
  onClick: onNext,
3795
3827
  disabled: currentPageNumber === lastPage ? true : false,
3796
- className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3828
+ className: `${styles$2['pagination-btn']} pagination-btn-rem`
3797
3829
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))), goTo && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("input", {
3798
3830
  onKeyDown: handleKeyDown,
3799
3831
  onInput: handleChangeInput,
@@ -3824,12 +3856,10 @@ Pagination.propTypes = {
3824
3856
  offset: PropTypes.number,
3825
3857
  totalCount: PropTypes.number,
3826
3858
  className: PropTypes.string,
3827
- siblingCount: PropTypes.number,
3828
3859
  currentPage: PropTypes.number
3829
3860
  };
3830
3861
  Pagination.defaultProps = {
3831
- offset: 2,
3832
- siblingCount: 2
3862
+ offset: 2
3833
3863
  };
3834
3864
 
3835
3865
  var css_248z$1 = ".autocomplate-module_autocomplate-content__UbIUT{display:flex;flex-direction:column;position:relative}.autocomplate-module_autocomplate-content-top__FVgCp{border:2px solid #d1d1d1;border-radius:6px;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;flex-direction:row;font-size:16px;font-weight:500;height:46px;line-height:22px;max-width:400px;padding:0 15px;transition:border-color .24s}.autocomplate-module_autocomplate-content-top__FVgCp.autocomplate-module_active__40fdV{border-color:#00236a}.autocomplate-module_autocomplate-content-top__FVgCp:hover{border-color:#3c393e}.autocomplate-module_autocomplate-content-bottom__yk0zP{animation:autocomplate-module_select-show__7Uap4 .64s linear forwards;background:#fbfbfb;border-radius:6px;box-shadow:0 0 10px rgba(60,57,62,.08);left:0;max-height:0;max-width:400px;overflow:hidden;position:absolute;top:52px;width:100%;z-index:1}.autocomplate-module_autocomplate-content-bottom-inner__rF5IF{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}@keyframes autocomplate-module_select-show__7Uap4{to{max-height:400px}}.autocomplate-module_autocomplate-content-bottom-row__dRsZa{align-items:center;background:#fff;box-sizing:border-box;color:#3c393e;cursor:pointer;display:flex;font-size:16px;font-weight:500;height:46px;line-height:22px;margin-bottom:2px;padding:0 15px;transition:background .24s,color .24s}.autocomplate-module_autocomplate-content-bottom-row__dRsZa .autocomplate-module_no-option__xv0-E{color:red}.autocomplate-module_autocomplate-content-bottom-row__dRsZa:hover{background:unset;color:#00236a}.autocomplate-module_option-active__WuH4I .autocomplate-module_autocomplate-content-bottom-row__dRsZa{color:#00236a}.autocomplate-module_autocomplate-title__3Qxqz{color:#3c393e;display:block;font-size:16px;font-weight:500;line-height:22px;margin-bottom:6px;text-transform:none}.autocomplate-module_errorBorder__LV-nb{border:2px solid #e00!important}.autocomplate-module_errorMessage__Gchpc{color:#e00!important}";
@@ -3838,12 +3868,10 @@ styleInject(css_248z$1);
3838
3868
 
3839
3869
  const Autocomplate = ({
3840
3870
  label,
3841
- value,
3842
3871
  required,
3843
3872
  disabled,
3844
3873
  keyNames,
3845
3874
  onChange,
3846
- className,
3847
3875
  searchCount,
3848
3876
  placeHolder,
3849
3877
  errorMessage,
@@ -3853,7 +3881,6 @@ const Autocomplate = ({
3853
3881
  ...props
3854
3882
  }) => {
3855
3883
  const configStyles = compereConfigs();
3856
- classnames(styles$1.searchBox, className);
3857
3884
  const parseSelectedOptionsData = jsonSelectedOptionsData ? JSON.parse(jsonSelectedOptionsData) : {
3858
3885
  name: '',
3859
3886
  id: ''
@@ -3895,7 +3922,7 @@ const Autocomplate = ({
3895
3922
  }, parseOptionsData.map((optionName, index) => {
3896
3923
  let className;
3897
3924
  if (index === activeOption) {
3898
- className = "option-active";
3925
+ className = 'option-active';
3899
3926
  }
3900
3927
  return /*#__PURE__*/React__default.createElement("div", {
3901
3928
  className: `${styles$1[className]} autocomplate-content-click-rem`,
@@ -3926,9 +3953,9 @@ const Autocomplate = ({
3926
3953
  className: `${styles$1['autocomplate-title']} autocomplate-title-rem`
3927
3954
  }, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
3928
3955
  style: {
3929
- color: "#ee0000"
3956
+ color: '#ee0000'
3930
3957
  }
3931
- }, "*")) : "", /*#__PURE__*/React__default.createElement("div", {
3958
+ }, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
3932
3959
  className: `${styles$1['autocomplate-content']} autocomplate-content-rem`
3933
3960
  }, /*#__PURE__*/React__default.createElement("input", _extends({
3934
3961
  id: inputId,
@@ -4047,6 +4074,7 @@ const NewAutocomplete = ({
4047
4074
  contentBottomRowMarginBottom,
4048
4075
  contentBottomRowBackgroundColor,
4049
4076
  contentBottomRowHoverBackgroundColor,
4077
+ backgroundDisableColor,
4050
4078
  ...props
4051
4079
  }) => {
4052
4080
  const [id, setId] = useState('');
@@ -4063,7 +4091,7 @@ const NewAutocomplete = ({
4063
4091
  max-height: 400px;
4064
4092
  }
4065
4093
  `;
4066
- const animation = _ => css`
4094
+ const animation = () => css`
4067
4095
  ${showOption} ${showOptionDuration ? showOptionDuration : configStyles.NEWAUTOCOMPLETE.showOptionDuration} linear forwards
4068
4096
  `;
4069
4097
  const handleMouseEnter = () => {
@@ -4159,7 +4187,7 @@ const NewAutocomplete = ({
4159
4187
  }))) : innerOptions.length <= 0 ? innerError ? '' : /*#__PURE__*/React__default.createElement("span", {
4160
4188
  style: {
4161
4189
  position: 'absolute',
4162
- zIndex: '9999999999',
4190
+ zIndex: '1',
4163
4191
  color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
4164
4192
  fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
4165
4193
  top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.INPUT.marginTop})`,
@@ -4174,6 +4202,7 @@ const NewAutocomplete = ({
4174
4202
  alert('Please add options prop');
4175
4203
  }
4176
4204
  options && options.length > 0 && options.map(item => {
4205
+ // eslint-disable-next-line no-prototype-builtins
4177
4206
  if (!item.hasOwnProperty(keyNames.name)) {
4178
4207
  alert(`Please add ${keyNames.name} property in items of options array`);
4179
4208
  }
@@ -4243,6 +4272,7 @@ const NewAutocomplete = ({
4243
4272
  cursor: disabled ? 'not-allowed' : 'auto',
4244
4273
  color: contentTopColor ? contentTopColor : configStyles.NEWAUTOCOMPLETE.contentTopColor,
4245
4274
  fontSize: contentTopSize ? contentTopSize : configStyles.NEWAUTOCOMPLETE.contentTopSize,
4275
+ backgroundColor: disabled && (backgroundDisableColor ?? configStyles.NEWAUTOCOMPLETE.backgroundDisableColor),
4246
4276
  height: contentTopHeight ? contentTopHeight : configStyles.NEWAUTOCOMPLETE.contentTopHeight,
4247
4277
  padding: contentTopPadding ? contentTopPadding : configStyles.NEWAUTOCOMPLETE.contentTopPadding,
4248
4278
  display: contentTopDisplay ? contentTopDisplay : configStyles.NEWAUTOCOMPLETE.contentTopDisplay,
@@ -4338,7 +4368,8 @@ NewAutocomplete.propTypes = {
4338
4368
  contentBottomRowMarginBottom: PropTypes.string,
4339
4369
  contentBottomBackgroundColor: PropTypes.string,
4340
4370
  contentBottomRowBackgroundColor: PropTypes.string,
4341
- contentBottomRowHoverBackgroundColor: PropTypes.string
4371
+ contentBottomRowHoverBackgroundColor: PropTypes.string,
4372
+ backgroundDisableColor: PropTypes.string
4342
4373
  };
4343
4374
  NewAutocomplete.defaultProps = {
4344
4375
  searchCount: 3,