@xaypay/tui 0.0.105 → 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 (91) 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 +84 -83
  8. package/dist/index.js +84 -83
  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 -159
  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 +97 -122
  65. package/src/components/pagination/pagination.stories.js +362 -362
  66. package/src/components/pagination/paginationRange.js +42 -53
  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 +31 -34
  72. package/src/components/singleCheckbox/index.js +36 -45
  73. package/src/components/singleCheckbox/singleCheckbox.stories.js +16 -16
  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/utils/index.js +11 -11
  91. package/tui.config.js +343 -341
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'] : '')
@@ -290,7 +288,7 @@ const Checkbox$1 = ({
290
288
  fillColor: checkedColor ? checkedColor : configStyles.SINGLECHECKBOX.checkedColor
291
289
  }) : /*#__PURE__*/React__default.createElement(SvgCheckboxUnchecked, {
292
290
  fillColor: unCheckedColor ? unCheckedColor : configStyles.SINGLECHECKBOX.unCheckedColor
293
- }));
291
+ }), data?.label && /*#__PURE__*/React__default.createElement("span", null, data.label));
294
292
  };
295
293
 
296
294
  const SingleCheckbox = ({
@@ -326,12 +324,12 @@ const SingleCheckbox = ({
326
324
  });
327
325
  };
328
326
  SingleCheckbox.propTypes = {
327
+ data: PropTypes.object,
329
328
  onClick: PropTypes.func,
330
329
  styles: PropTypes.object,
331
330
  disabled: PropTypes.bool,
332
331
  checkedColor: PropTypes.string,
333
- unCheckedColor: PropTypes.string,
334
- data: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired
332
+ unCheckedColor: PropTypes.string
335
333
  };
336
334
 
337
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}";
@@ -353,10 +351,13 @@ styleInject(css_248z$e);
353
351
  tBodyFontWeight: PropTypes.string,
354
352
  tBodyFontFamily: PropTypes.string,
355
353
  tBodyRowBorder: PropTypes.string,
356
- handleCheckedBody: PropTypes.func,
357
- handleCheckedHeader: PropTypes.func,
358
- handleHeaderItemClick: PropTypes.func,
359
- 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
360
361
  });
361
362
 
362
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)}}";
@@ -477,7 +478,8 @@ const Modal = ({
477
478
  justifyContent,
478
479
  backgroundColor,
479
480
  grayDecorHeight,
480
- layerBackgroundColor
481
+ layerBackgroundColor,
482
+ imageWrapHeight
481
483
  }) => {
482
484
  const [select, setSelect] = useState(0);
483
485
  const [innerData, setInnerData] = useState([]);
@@ -650,10 +652,12 @@ const Modal = ({
650
652
  }
651
653
  }, /*#__PURE__*/React__default.createElement(SvgCloseSlide, null))), /*#__PURE__*/React__default.createElement("div", {
652
654
  style: {
653
- height: '100%'
655
+ width: '100%',
656
+ height: imageWrapHeight ? imageWrapHeight : configStyles.MODAL.imageWrapHeight
654
657
  }
655
658
  }, innerData && innerData.length > 0 && innerData.map((item, index) => {
656
659
  if (select === index) {
660
+ // eslint-disable-next-line no-prototype-builtins
657
661
  if (!item.hasOwnProperty('url')) {
658
662
  alert('Please add url property in data prop on each element');
659
663
  } else {
@@ -672,7 +676,7 @@ const Modal = ({
672
676
  }
673
677
  }
674
678
  }), innerData && innerData.length > 1 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("button", {
675
- onClick: _ => handleGoTo('prev'),
679
+ onClick: () => handleGoTo('prev'),
676
680
  style: {
677
681
  position: 'absolute',
678
682
  left: '14px',
@@ -686,7 +690,7 @@ const Modal = ({
686
690
  backgroundColor: 'transparent'
687
691
  }
688
692
  }, /*#__PURE__*/React__default.createElement(SvgPrev, null)), /*#__PURE__*/React__default.createElement("button", {
689
- onClick: _ => handleGoTo('next'),
693
+ onClick: () => handleGoTo('next'),
690
694
  style: {
691
695
  position: 'absolute',
692
696
  width: '24px',
@@ -741,9 +745,9 @@ styleInject(css_248z$c);
741
745
 
742
746
  const InputTypes = {
743
747
  TEL: 'tel',
744
- TEXT: "text",
748
+ TEXT: 'text',
745
749
  NUMBER: 'number',
746
- PASSWORD: "password"
750
+ PASSWORD: 'password'
747
751
  };
748
752
  const P = styled.span`
749
753
  animation: ${props => props.errorAnimation ? props.animation : 'none'};
@@ -789,7 +793,6 @@ const Input = ({
789
793
  errorMessage,
790
794
  autoComplete,
791
795
  labelDisplay,
792
- errorPosition,
793
796
  boxShadowHover,
794
797
  errorClassName,
795
798
  errorAnimation,
@@ -825,7 +828,7 @@ const Input = ({
825
828
  -o-transform: scale3d(1,1,1);
826
829
  }
827
830
  `;
828
- const animation = _ => css`
831
+ const animation = () => css`
829
832
  ${errorShow} ${errorAnimationDuration ? errorAnimationDuration : configStyles.INPUT.errorAnimationDuration} forwards
830
833
  `;
831
834
  const handleChange = event => {
@@ -1076,9 +1079,9 @@ const Input = ({
1076
1079
  }
1077
1080
  }, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage, telErrorMessage]);
1078
1081
  return /*#__PURE__*/React__default.createElement("div", {
1079
- className: `${styles$a["input-wrap"]}`
1082
+ className: `${styles$a['input-wrap']}`
1080
1083
  }, label ? /*#__PURE__*/React__default.createElement("label", {
1081
- className: `${styles$a["input-title"]}`,
1084
+ className: `${styles$a['input-title']}`,
1082
1085
  style: {
1083
1086
  color: labelColor ? labelColor : configStyles.INPUT.labelColor,
1084
1087
  fontSize: labelSize ? labelSize : configStyles.INPUT.labelSize,
@@ -1089,10 +1092,10 @@ const Input = ({
1089
1092
  }
1090
1093
  }, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
1091
1094
  style: {
1092
- color: errorColor ? errorColor : "#ee0000"
1095
+ color: errorColor ? errorColor : '#ee0000'
1093
1096
  }
1094
1097
  }, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
1095
- className: `${styles$a["input-content"]}`,
1098
+ className: `${styles$a['input-content']}`,
1096
1099
  style: {
1097
1100
  width: width ? width : configStyles.INPUT.width,
1098
1101
  borderRadius: radius ? radius : configStyles.INPUT.radius,
@@ -1136,7 +1139,7 @@ const Input = ({
1136
1139
  value: innerValue,
1137
1140
  className: classProps,
1138
1141
  onInput: handleChange,
1139
- disabled: disabled ? disabled : "",
1142
+ disabled: disabled ? disabled : '',
1140
1143
  name: name ? name : `tui_${random}_tui`,
1141
1144
  placeholder: placeholder ? placeholder : '',
1142
1145
  type: show || type === 'number' ? 'text' : type,
@@ -1248,7 +1251,7 @@ Input.propTypes = {
1248
1251
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
1249
1252
  };
1250
1253
  Input.defaultProps = {
1251
- type: "text"
1254
+ type: 'text'
1252
1255
  };
1253
1256
 
1254
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}";
@@ -1264,28 +1267,27 @@ const Radio = ({
1264
1267
  value,
1265
1268
  jsonData,
1266
1269
  label,
1267
- keyNames,
1268
1270
  ...props
1269
1271
  }) => {
1270
1272
  const classProps = classnames(styles$9.checkbox, className);
1271
1273
  const parseData = jsonData.length !== 0 ? JSON.parse(jsonData) : [];
1272
1274
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, parseData.map((element, id) => {
1273
1275
  return /*#__PURE__*/React__default.createElement("label", {
1274
- className: `${styles$9["radio-wrap"]} radio-wrap-rem`,
1276
+ className: `${styles$9['radio-wrap']} radio-wrap-rem`,
1275
1277
  key: element.value
1276
1278
  }, /*#__PURE__*/React__default.createElement("input", _extends({
1277
1279
  type: "radio",
1278
1280
  className: classProps,
1279
1281
  disabled: disabled,
1280
1282
  required: required,
1281
- defaultChecked: id === 0 ? defaultChecked : "",
1283
+ defaultChecked: id === 0 ? defaultChecked : '',
1282
1284
  value: value ? value : element.value,
1283
1285
  name: name ? name : element.name
1284
1286
  }, props)), /*#__PURE__*/React__default.createElement("span", {
1285
- className: `${styles$9["radio-checkmark"]} radio-checkmark-rem`
1287
+ className: `${styles$9['radio-checkmark']} radio-checkmark-rem`
1286
1288
  }), element.label ? /*#__PURE__*/React__default.createElement("span", {
1287
1289
  className: styles$9.labelRadio
1288
- }, label ? label : element.label) : "");
1290
+ }, label ? label : element.label) : '');
1289
1291
  }));
1290
1292
  };
1291
1293
  Radio.propTypes = {
@@ -1307,6 +1309,7 @@ Radio.defaultProps = {
1307
1309
 
1308
1310
  const Button = ({
1309
1311
  icon,
1312
+ hoverIcon,
1310
1313
  size,
1311
1314
  type,
1312
1315
  font,
@@ -1373,21 +1376,22 @@ const Button = ({
1373
1376
  },
1374
1377
  type: type ? type : configStyles.BUTTON.type,
1375
1378
  disabled: disabled ? disabled : configStyles.BUTTON.disabled,
1376
- 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') : _ => _,
1377
1380
  onMouseEnter: handleMouseEnter,
1378
1381
  onMouseLeave: handleMouseLeave,
1379
1382
  className: classProps
1380
- }, props), icon && icon, " ", label && /*#__PURE__*/React__default.createElement("span", {
1383
+ }, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
1381
1384
  style: {
1382
1385
  marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.btnIconMarginRight : '0px'
1383
1386
  }
1384
- }, label), " ", !icon && !label && 'Add icon or label prop on Button component');
1387
+ }, label), ' ', !icon && !label && 'Add icon or label prop on Button component');
1385
1388
  };
1386
1389
  Button.propTypes = {
1387
1390
  type: PropTypes.string,
1388
1391
  size: PropTypes.string,
1389
1392
  font: PropTypes.string,
1390
1393
  icon: PropTypes.element,
1394
+ hoverIcon: PropTypes.element,
1391
1395
  color: PropTypes.string,
1392
1396
  width: PropTypes.string,
1393
1397
  outline: PropTypes.bool,
@@ -1558,6 +1562,7 @@ const Select = ({
1558
1562
  };
1559
1563
  const isObjectEmpty = obj => {
1560
1564
  for (var key in obj) {
1565
+ // eslint-disable-next-line no-prototype-builtins
1561
1566
  if (obj.hasOwnProperty(key)) {
1562
1567
  return false;
1563
1568
  }
@@ -1571,9 +1576,9 @@ const Select = ({
1571
1576
  setOpened(false);
1572
1577
  }
1573
1578
  };
1574
- document.addEventListener("mousedown", checkIfClickedOutside);
1579
+ document.addEventListener('mousedown', checkIfClickedOutside);
1575
1580
  return () => {
1576
- document.removeEventListener("mousedown", checkIfClickedOutside);
1581
+ document.removeEventListener('mousedown', checkIfClickedOutside);
1577
1582
  };
1578
1583
  }
1579
1584
  }, [opened]);
@@ -1588,7 +1593,7 @@ const Select = ({
1588
1593
  if (!multiple) {
1589
1594
  options && options.length > 0 && setExistOptions(options);
1590
1595
  } else {
1591
- const modifiedOptions = options && options.length > 0 && options.map((item, index) => {
1596
+ const modifiedOptions = options && options.length > 0 && options.map(item => {
1592
1597
  item.checked = false;
1593
1598
  if (selected && selected.length > 0) {
1594
1599
  selected.map(innerItem => {
@@ -1619,9 +1624,9 @@ const Select = ({
1619
1624
  }
1620
1625
  }, label, required && /*#__PURE__*/React__default.createElement("sup", {
1621
1626
  style: {
1622
- color: "#ee0000"
1627
+ color: '#ee0000'
1623
1628
  }
1624
- }, "*")) : "", /*#__PURE__*/React__default.createElement("div", {
1629
+ }, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
1625
1630
  ref: ref
1626
1631
  }, /*#__PURE__*/React__default.createElement("div", {
1627
1632
  className: styles$8['select-content']
@@ -1639,9 +1644,9 @@ const Select = ({
1639
1644
  backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selectedDisableBackgroundColor : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selectedBackgroundColor,
1640
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
1641
1646
  },
1642
- onClick: disabled ? _ => _ : _ => handleOpenClose(),
1643
- onMouseEnter: disabled ? _ => _ : _ => handleMouseEnter(),
1644
- onMouseLeave: disabled ? _ => _ : _ => handleMouseLeave(),
1647
+ onClick: disabled ? _ => _ : () => handleOpenClose(),
1648
+ onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
1649
+ onMouseLeave: disabled ? _ => _ : () => handleMouseLeave(),
1645
1650
  className: `${styles$8['select-content-top']}`
1646
1651
  }, /*#__PURE__*/React__default.createElement("div", {
1647
1652
  className: `${styles$8['select-content-top-text']}`,
@@ -1687,7 +1692,7 @@ const Select = ({
1687
1692
  key: i,
1688
1693
  disabled: true,
1689
1694
  defaultValue: option[keyNames.id],
1690
- onClick: disabled ? _ => _ : _ => handleSelectItem(option),
1695
+ onClick: disabled ? _ => _ : () => handleSelectItem(option),
1691
1696
  onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
1692
1697
  onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
1693
1698
  className: `${styles$8['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$8['ellipsis'] : ''}`,
@@ -2002,6 +2007,7 @@ Toast.defaultProps = {
2002
2007
  let toastify;
2003
2008
  let path = window.location.href;
2004
2009
  const removeToast = ref => {
2010
+ // eslint-disable-next-line react/no-find-dom-node
2005
2011
  const node = ReactDOM.findDOMNode(ref.current);
2006
2012
  const removeElem = node.parentNode;
2007
2013
  const parent = removeElem.parentNode;
@@ -2176,7 +2182,7 @@ const Tooltip = ({
2176
2182
  const handleShow = () => {
2177
2183
  setShowTooltip(!showTooltip);
2178
2184
  };
2179
- useEffect(_ => {
2185
+ useEffect(() => {
2180
2186
  if (!text) {
2181
2187
  alert('Add text on tooltip');
2182
2188
  }
@@ -2354,7 +2360,6 @@ const Captcha = ({
2354
2360
  right: '0px',
2355
2361
  width: '100%',
2356
2362
  height: '4px',
2357
- borderRadius: '2px',
2358
2363
  backgroundColor: '#EEEEEE',
2359
2364
  borderRadius: '10px',
2360
2365
  zIndex: -2
@@ -2386,7 +2391,6 @@ const Captcha = ({
2386
2391
  height: '4px',
2387
2392
  borderRadius: '2px',
2388
2393
  backgroundColor: +rangeProgress === rangeNumber ? '#0DA574' : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? '#EE0000' : 'transparent',
2389
- borderRadius: '2px',
2390
2394
  zIndex: -1
2391
2395
  }
2392
2396
  })), /*#__PURE__*/React__default.createElement("div", {
@@ -2410,12 +2414,9 @@ var styles$4 = {"stepper-container":"stepper-module_stepper-container__-OVGy","b
2410
2414
  styleInject(css_248z$6);
2411
2415
 
2412
2416
  const Stepper = ({
2413
- className,
2414
- onChange,
2415
2417
  stepLength,
2416
2418
  activeSteps
2417
2419
  }) => {
2418
- classnames(className, 'stepper-inner-rem');
2419
2420
  return /*#__PURE__*/React__default.createElement("div", {
2420
2421
  className: `${styles$4['stepper-container']} stepper-container-rem`
2421
2422
  }, (() => {
@@ -2426,7 +2427,7 @@ const Stepper = ({
2426
2427
  key: step
2427
2428
  }, /*#__PURE__*/React__default.createElement("div", {
2428
2429
  className: classnames(`${step <= activeSteps ? styles$4.smallActiveRing : styles$4.smallRing}`)
2429
- }, step <= activeSteps ? step : "")));
2430
+ }, step <= activeSteps ? step : '')));
2430
2431
  }
2431
2432
  return steppers;
2432
2433
  })());
@@ -2471,7 +2472,7 @@ for (let i = 0; i < 256; ++i) {
2471
2472
  function unsafeStringify(arr, offset = 0) {
2472
2473
  // Note: Be careful editing this code! It's been tuned for performance
2473
2474
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
2474
- 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]];
2475
2476
  }
2476
2477
 
2477
2478
  const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
@@ -2606,6 +2607,7 @@ const SvgListItemDelete = ({
2606
2607
  fill: fillColor ? fillColor : '#051942'
2607
2608
  }));
2608
2609
 
2610
+ // eslint-disable-next-line react/display-name
2609
2611
  const FileItem = /*#__PURE__*/React__default.memo(({
2610
2612
  size,
2611
2613
  name,
@@ -2897,6 +2899,7 @@ const NewFile = ({
2897
2899
  const [image, setImage] = useState(!multiple ? defaultData ? defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf' : null : null);
2898
2900
  const configStyles = compereConfigs();
2899
2901
  const handleRemoveComponent = () => {
2902
+ // eslint-disable-next-line react/no-find-dom-node
2900
2903
  const node = ReactDOM.findDOMNode(ref.current);
2901
2904
  const parent = node.parentNode;
2902
2905
  parent.removeChild(node);
@@ -3117,7 +3120,7 @@ const NewFile = ({
3117
3120
  style: {
3118
3121
  margin: '0px'
3119
3122
  }
3120
- }, 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", {
3121
3124
  style: {
3122
3125
  color: uploadColor ? uploadColor : configStyles.File.uploadColor
3123
3126
  }
@@ -3129,7 +3132,7 @@ const NewFile = ({
3129
3132
  style: {
3130
3133
  margin: '0px'
3131
3134
  }
3132
- }, 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", {
3133
3136
  style: {
3134
3137
  position: 'absolute',
3135
3138
  top: '0px',
@@ -3169,7 +3172,7 @@ const NewFile = ({
3169
3172
  name: item.file.name,
3170
3173
  removeFile: removeFile ? removeFile : _ => _,
3171
3174
  radius: radius ? radius : configStyles.File.radius,
3172
- fileFormat: item.file.type.split('/')[1].toLowerCase(),
3175
+ fileFormat: item.file.type.split('/')[1]?.toLowerCase(),
3173
3176
  progressColor: progressColor ? progressColor : configStyles.File.progressColor,
3174
3177
  listItemHeight: listItemHeight ? listItemHeight : configStyles.File.listItemHeight,
3175
3178
  listItemPadding: listItemPadding ? listItemPadding : configStyles.File.listItemPadding,
@@ -3250,11 +3253,8 @@ const Checkbox = ({
3250
3253
  disabled,
3251
3254
  required,
3252
3255
  className,
3253
- name,
3254
- value,
3255
3256
  jsonData,
3256
3257
  onChange,
3257
- label,
3258
3258
  keyNames,
3259
3259
  onClick,
3260
3260
  ...props
@@ -3292,7 +3292,7 @@ const Checkbox = ({
3292
3292
  } : '';
3293
3293
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, data.map(element => {
3294
3294
  return /*#__PURE__*/React__default.createElement("label", {
3295
- className: `${styles$3["checkbox-wrap"]} checkbox-wrap-rem`,
3295
+ className: `${styles$3['checkbox-wrap']} checkbox-wrap-rem`,
3296
3296
  key: element.value
3297
3297
  }, /*#__PURE__*/React__default.createElement("input", _extends({
3298
3298
  type: "checkbox",
@@ -3306,11 +3306,11 @@ const Checkbox = ({
3306
3306
  onClick: onClick ? onClick : () => {},
3307
3307
  defaultChecked: element.checked
3308
3308
  }, props)), /*#__PURE__*/React__default.createElement("span", {
3309
- className: `${styles$3["checkmark"]} checkmark-rem`
3309
+ className: `${styles$3['checkmark']} checkmark-rem`
3310
3310
  }), element[keyNames.label] ? /*#__PURE__*/React__default.createElement("label", {
3311
3311
  className: styles$3.labelCheckbox,
3312
- for: element[keyNames.id]
3313
- }, element[keyNames.label]) : "");
3312
+ htmlFor: element[keyNames.id]
3313
+ }, element[keyNames.label]) : '');
3314
3314
  }));
3315
3315
  };
3316
3316
  Checkbox.propTypes = {
@@ -3592,7 +3592,7 @@ const Typography = ({
3592
3592
  return validVariant ? 'Please set Typography valid variant' : tagT;
3593
3593
  };
3594
3594
  Typography.propTypes = {
3595
- size: PropTypes.string,
3595
+ size: PropTypes.oneOf(PropTypes.string, PropTypes.number),
3596
3596
  color: PropTypes.string,
3597
3597
  onClick: PropTypes.func,
3598
3598
  weight: PropTypes.string,
@@ -3619,7 +3619,7 @@ var css_248z$2 = ".pagination-module_listItem__b1-WN:focus{background-color:#4ca
3619
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"};
3620
3620
  styleInject(css_248z$2);
3621
3621
 
3622
- const Dots = "...";
3622
+ const Dots = '...';
3623
3623
  const range = (start, end) => {
3624
3624
  const length = end - start + 1;
3625
3625
  return Array.from({
@@ -3732,7 +3732,7 @@ const Pagination = ({
3732
3732
  if (currentPageNumber === 0 || paginationRange?.length < 2) {
3733
3733
  return null;
3734
3734
  }
3735
- 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`);
3736
3736
  const onNext = () => {
3737
3737
  onPageChange(currentPageNumber + 1);
3738
3738
  };
@@ -3742,7 +3742,7 @@ const Pagination = ({
3742
3742
  const onNextFive = () => {
3743
3743
  currentPageNumber !== lastPage - 4 ? onPageChange(currentPageNumber + 5) : onPageChange(currentPageNumber + 4);
3744
3744
  };
3745
- const onPreviousFive = e => {
3745
+ const onPreviousFive = () => {
3746
3746
  currentPageNumber !== 5 ? onPageChange(currentPageNumber - 5) : onPageChange(currentPageNumber - 4);
3747
3747
  };
3748
3748
  const handleChangeInput = e => {
@@ -3759,7 +3759,7 @@ const Pagination = ({
3759
3759
  }
3760
3760
  };
3761
3761
  const handleKeyDown = e => {
3762
- const forbiddenKeys = ["e", ".", "+", "-"];
3762
+ const forbiddenKeys = ['e', '.', '+', '-'];
3763
3763
  if (forbiddenKeys.includes(e.key)) {
3764
3764
  e.preventDefault();
3765
3765
  }
@@ -3795,37 +3795,37 @@ const Pagination = ({
3795
3795
  },
3796
3796
  onClick: onPrevious,
3797
3797
  disabled: currentPageNumber === 1 ? true : false,
3798
- className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3798
+ className: `${styles$2['pagination-btn']} pagination-btn-rem`
3799
3799
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
3800
3800
  if (pageNumber === Dots) {
3801
3801
  let currentPageIndex = paginationRange.indexOf(currentPageNumber);
3802
3802
  return /*#__PURE__*/React__default.createElement("li", {
3803
3803
  key: id,
3804
- 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),
3805
3805
  onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
3806
3806
  disabled: currentPageIndex === 0 ? true : false
3807
3807
  }, id < currentPageIndex ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
3808
- 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`
3809
3809
  }, /*#__PURE__*/React__default.createElement(SvgDots, null)), /*#__PURE__*/React__default.createElement("span", {
3810
- 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`,
3811
3811
  style: {
3812
3812
  transform: 'rotate(180deg)'
3813
3813
  }
3814
3814
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
3815
- 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`
3816
3816
  }, /*#__PURE__*/React__default.createElement(SvgDots, null)), /*#__PURE__*/React__default.createElement("span", {
3817
- 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`
3818
3818
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))));
3819
3819
  }
3820
3820
  return /*#__PURE__*/React__default.createElement("li", {
3821
3821
  onClick: () => onPageChange(pageNumber),
3822
3822
  key: id,
3823
- 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`)
3824
3824
  }, pageNumber);
3825
3825
  }), /*#__PURE__*/React__default.createElement("button", {
3826
3826
  onClick: onNext,
3827
3827
  disabled: currentPageNumber === lastPage ? true : false,
3828
- className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3828
+ className: `${styles$2['pagination-btn']} pagination-btn-rem`
3829
3829
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))), goTo && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("input", {
3830
3830
  onKeyDown: handleKeyDown,
3831
3831
  onInput: handleChangeInput,
@@ -3868,12 +3868,10 @@ styleInject(css_248z$1);
3868
3868
 
3869
3869
  const Autocomplate = ({
3870
3870
  label,
3871
- value,
3872
3871
  required,
3873
3872
  disabled,
3874
3873
  keyNames,
3875
3874
  onChange,
3876
- className,
3877
3875
  searchCount,
3878
3876
  placeHolder,
3879
3877
  errorMessage,
@@ -3883,7 +3881,6 @@ const Autocomplate = ({
3883
3881
  ...props
3884
3882
  }) => {
3885
3883
  const configStyles = compereConfigs();
3886
- classnames(styles$1.searchBox, className);
3887
3884
  const parseSelectedOptionsData = jsonSelectedOptionsData ? JSON.parse(jsonSelectedOptionsData) : {
3888
3885
  name: '',
3889
3886
  id: ''
@@ -3925,7 +3922,7 @@ const Autocomplate = ({
3925
3922
  }, parseOptionsData.map((optionName, index) => {
3926
3923
  let className;
3927
3924
  if (index === activeOption) {
3928
- className = "option-active";
3925
+ className = 'option-active';
3929
3926
  }
3930
3927
  return /*#__PURE__*/React__default.createElement("div", {
3931
3928
  className: `${styles$1[className]} autocomplate-content-click-rem`,
@@ -3956,9 +3953,9 @@ const Autocomplate = ({
3956
3953
  className: `${styles$1['autocomplate-title']} autocomplate-title-rem`
3957
3954
  }, label, " ", required && /*#__PURE__*/React__default.createElement("sup", {
3958
3955
  style: {
3959
- color: "#ee0000"
3956
+ color: '#ee0000'
3960
3957
  }
3961
- }, "*")) : "", /*#__PURE__*/React__default.createElement("div", {
3958
+ }, "*")) : '', /*#__PURE__*/React__default.createElement("div", {
3962
3959
  className: `${styles$1['autocomplate-content']} autocomplate-content-rem`
3963
3960
  }, /*#__PURE__*/React__default.createElement("input", _extends({
3964
3961
  id: inputId,
@@ -4077,6 +4074,7 @@ const NewAutocomplete = ({
4077
4074
  contentBottomRowMarginBottom,
4078
4075
  contentBottomRowBackgroundColor,
4079
4076
  contentBottomRowHoverBackgroundColor,
4077
+ backgroundDisableColor,
4080
4078
  ...props
4081
4079
  }) => {
4082
4080
  const [id, setId] = useState('');
@@ -4093,7 +4091,7 @@ const NewAutocomplete = ({
4093
4091
  max-height: 400px;
4094
4092
  }
4095
4093
  `;
4096
- const animation = _ => css`
4094
+ const animation = () => css`
4097
4095
  ${showOption} ${showOptionDuration ? showOptionDuration : configStyles.NEWAUTOCOMPLETE.showOptionDuration} linear forwards
4098
4096
  `;
4099
4097
  const handleMouseEnter = () => {
@@ -4189,7 +4187,7 @@ const NewAutocomplete = ({
4189
4187
  }))) : innerOptions.length <= 0 ? innerError ? '' : /*#__PURE__*/React__default.createElement("span", {
4190
4188
  style: {
4191
4189
  position: 'absolute',
4192
- zIndex: '9999999999',
4190
+ zIndex: '1',
4193
4191
  color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
4194
4192
  fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
4195
4193
  top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.INPUT.marginTop})`,
@@ -4204,6 +4202,7 @@ const NewAutocomplete = ({
4204
4202
  alert('Please add options prop');
4205
4203
  }
4206
4204
  options && options.length > 0 && options.map(item => {
4205
+ // eslint-disable-next-line no-prototype-builtins
4207
4206
  if (!item.hasOwnProperty(keyNames.name)) {
4208
4207
  alert(`Please add ${keyNames.name} property in items of options array`);
4209
4208
  }
@@ -4273,6 +4272,7 @@ const NewAutocomplete = ({
4273
4272
  cursor: disabled ? 'not-allowed' : 'auto',
4274
4273
  color: contentTopColor ? contentTopColor : configStyles.NEWAUTOCOMPLETE.contentTopColor,
4275
4274
  fontSize: contentTopSize ? contentTopSize : configStyles.NEWAUTOCOMPLETE.contentTopSize,
4275
+ backgroundColor: disabled && (backgroundDisableColor ?? configStyles.NEWAUTOCOMPLETE.backgroundDisableColor),
4276
4276
  height: contentTopHeight ? contentTopHeight : configStyles.NEWAUTOCOMPLETE.contentTopHeight,
4277
4277
  padding: contentTopPadding ? contentTopPadding : configStyles.NEWAUTOCOMPLETE.contentTopPadding,
4278
4278
  display: contentTopDisplay ? contentTopDisplay : configStyles.NEWAUTOCOMPLETE.contentTopDisplay,
@@ -4368,7 +4368,8 @@ NewAutocomplete.propTypes = {
4368
4368
  contentBottomRowMarginBottom: PropTypes.string,
4369
4369
  contentBottomBackgroundColor: PropTypes.string,
4370
4370
  contentBottomRowBackgroundColor: PropTypes.string,
4371
- contentBottomRowHoverBackgroundColor: PropTypes.string
4371
+ contentBottomRowHoverBackgroundColor: PropTypes.string,
4372
+ backgroundDisableColor: PropTypes.string
4372
4373
  };
4373
4374
  NewAutocomplete.defaultProps = {
4374
4375
  searchCount: 3,