@xaypay/tui 0.0.69 → 0.0.71

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 (69) hide show
  1. package/dist/index.es.js +1323 -294
  2. package/dist/index.js +1323 -292
  3. package/package.json +3 -2
  4. package/src/assets/range-arrow-default.svg +19 -0
  5. package/src/assets/range-arrow-error.svg +19 -0
  6. package/src/assets/range-arrow-success.svg +19 -0
  7. package/src/components/captcha/captcha.module.css +61 -62
  8. package/src/components/captcha/captcha.stories.js +5 -4
  9. package/src/components/captcha/index.js +146 -56
  10. package/src/components/file/file.module.css +1 -1
  11. package/src/components/file/index.js +10 -8
  12. package/src/components/icon/Arrow.js +2 -2
  13. package/src/components/icon/CaptchaArrowDown.js +19 -0
  14. package/src/components/icon/CaptchaArrowUp.js +19 -0
  15. package/src/components/icon/CheckboxChecked.js +2 -2
  16. package/src/components/icon/CheckboxUnchecked.js +2 -2
  17. package/src/components/icon/CloseIcon.js +2 -2
  18. package/src/components/icon/DeleteComponent.js +20 -0
  19. package/src/components/icon/Dots.js +6 -6
  20. package/src/components/icon/ListItemDelete.js +19 -0
  21. package/src/components/icon/ListItemJpg.js +21 -0
  22. package/src/components/icon/ListItemPdf.js +21 -0
  23. package/src/components/icon/Nextarrow.js +19 -0
  24. package/src/components/icon/PDF.js +19 -0
  25. package/src/components/icon/RangeArrowDefault.js +54 -0
  26. package/src/components/icon/RangeArrowError.js +54 -0
  27. package/src/components/icon/RangeArrowSuccess.js +54 -0
  28. package/src/components/icon/RemoveFile.js +20 -0
  29. package/src/components/icon/ToasterClose.js +2 -2
  30. package/src/components/icon/ToasterError.js +2 -2
  31. package/src/components/icon/ToasterInfo.js +2 -2
  32. package/src/components/icon/ToasterSuccess.js +2 -2
  33. package/src/components/icon/ToasterWarning.js +2 -2
  34. package/src/components/icon/Tooltip.js +2 -2
  35. package/src/components/icon/Upload.js +25 -0
  36. package/src/components/icon/index.js +1 -10
  37. package/src/components/input/index.js +36 -31
  38. package/src/components/newAutocomplete/NewAutocomplete.stories.js +50 -0
  39. package/src/components/newAutocomplete/index.js +407 -0
  40. package/src/components/newFile/index.js +463 -0
  41. package/src/components/newFile/newFile.stories.js +41 -0
  42. package/src/components/pagination/index.js +5 -5
  43. package/src/components/textarea/index.js +63 -27
  44. package/src/components/textarea/textarea.stories.js +3 -3
  45. package/src/components/toaster/Toast.js +1 -1
  46. package/src/components/tooltip/index.js +2 -2
  47. package/src/index.js +3 -1
  48. package/src/stories/configuration.stories.mdx +87 -0
  49. package/src/stories/static/captcha-usage.png +0 -0
  50. package/src/stories/static/new-autocomplete-usage.png +0 -0
  51. package/src/stories/usage.stories.mdx +10 -3
  52. package/tui.config.js +120 -21
  53. package/src/assets/icons/arrow.svg +0 -3
  54. package/src/assets/icons/checkbox-checked.svg +0 -3
  55. package/src/assets/icons/checkbox-unchecked.svg +0 -3
  56. package/src/assets/icons/close-icon.svg +0 -3
  57. package/src/assets/icons/dots.svg +0 -3
  58. package/src/assets/icons/nextarrow.svg +0 -3
  59. package/src/assets/icons/toaster-close.svg +0 -3
  60. package/src/assets/icons/toaster-error.svg +0 -3
  61. package/src/assets/icons/toaster-info.svg +0 -3
  62. package/src/assets/icons/toaster-success.svg +0 -3
  63. package/src/assets/icons/toaster-warning.svg +0 -3
  64. package/src/assets/icons/tooltip.svg +0 -3
  65. package/src/assets/upload.svg +0 -4
  66. package/src/components/captcha/blue.png +0 -0
  67. package/src/components/captcha/green.png +0 -0
  68. package/src/components/captcha/red.png +0 -0
  69. package/src/components/icon/NextArrow.js +0 -19
package/dist/index.js CHANGED
@@ -28,13 +28,46 @@ function _interopNamespace(e) {
28
28
  return Object.freeze(n);
29
29
  }
30
30
 
31
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
32
31
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
33
33
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
34
34
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
35
35
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
36
36
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
37
37
 
38
+ function _extends() {
39
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
40
+ for (var i = 1; i < arguments.length; i++) {
41
+ var source = arguments[i];
42
+ for (var key in source) {
43
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
44
+ target[key] = source[key];
45
+ }
46
+ }
47
+ }
48
+ return target;
49
+ };
50
+ return _extends.apply(this, arguments);
51
+ }
52
+
53
+ const SvgPdf = ({
54
+ title,
55
+ titleId,
56
+ ...props
57
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
58
+ width: "40",
59
+ height: "52",
60
+ viewBox: "0 0 40 52",
61
+ fill: "none",
62
+ xmlns: "http://www.w3.org/2000/svg",
63
+ "aria-labelledby": titleId
64
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
65
+ id: titleId
66
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
67
+ d: "M39.1304 13.1106V36.2849V36.2853C39.394 36.4388 39.6133 36.6599 39.7659 36.9263C39.9189 37.1931 39.9992 37.4956 40 37.8037V47.5932C39.9984 48.7614 39.54 49.8816 38.7252 50.7079C37.91 51.5337 36.8048 51.9984 35.6522 52H4.34783C3.19523 51.9984 2.09005 51.5338 1.27483 50.7079C0.460015 49.8816 0.0015528 48.7614 0 47.5932V34.7817C0.000775155 34.4736 0.0815204 34.1714 0.234087 33.9051C0.386643 33.6383 0.605983 33.4176 0.869565 33.2641V3.52545C0.869565 2.5906 1.23602 1.69387 1.8882 1.03245C2.54072 0.371431 3.42547 0 4.34783 0H26.1953L39.1304 13.1106ZM13.872 45.3893C14.6037 45.4385 15.3293 45.2261 15.9225 44.7893C16.4303 44.3463 16.7036 43.6872 16.6605 43.0096C16.671 42.6272 16.598 42.2471 16.4478 41.8965C16.3154 41.6026 16.1136 41.3464 15.8597 41.1509C15.5976 40.9542 15.2991 40.8137 14.9816 40.7385C14.6225 40.6512 14.2541 40.6083 13.8849 40.6115H11.0258V48.4741H12.6849V45.3893H13.872ZM22.6954 47.4563C23.0149 47.1041 23.2498 46.6815 23.3814 46.2224C23.5347 45.6809 23.6084 45.1195 23.5999 44.5564C23.6065 44.008 23.5362 43.4614 23.3918 42.933C23.2672 42.477 23.0475 42.0532 22.7474 41.6904C22.4465 41.3379 22.0669 41.064 21.6398 40.8917C21.1305 40.6934 20.5882 40.5982 20.0432 40.6116H17.506V48.4821H20.0642C21.0475 48.5494 22.0103 48.1743 22.6954 47.4563ZM26.1252 42.05H29.4956L29.4956 40.6115H24.4661V48.4804L26.1287 48.4808V45.1068L28.6505 45.0962L28.64 43.6577H26.1252V42.05ZM18.3352 36.0407H37.3911L37.3908 14.3567H28.4428C27.5205 14.3567 26.6358 13.9852 25.9836 13.3238C25.331 12.6628 24.9646 11.7661 24.9646 10.8312V1.76186H4.34743C3.88625 1.76186 3.4437 1.94758 3.11762 2.27808C2.79153 2.60859 2.6083 3.05715 2.6083 3.52458V33.0185H14.9392C15.4408 33.0185 15.9179 33.238 16.2482 33.6205L18.3352 36.0407ZM6.08594 13.7151C6.08594 13.2283 6.48054 12.8337 6.9673 12.8337H20.6043C21.0911 12.8337 21.4857 13.2283 21.4857 13.7151C21.4857 14.2019 21.0911 14.5965 20.6043 14.5965H6.9673C6.48054 14.5965 6.08594 14.2019 6.08594 13.7151ZM18.5137 25.3369C18.5137 24.8502 18.9083 24.4556 19.395 24.4556H33.0321C33.5188 24.4556 33.9134 24.8502 33.9134 25.3369C33.9134 25.8237 33.5188 26.2183 33.0321 26.2183H19.395C18.9083 26.2183 18.5137 25.8237 18.5137 25.3369ZM6.9673 16.7056C6.48054 16.7056 6.08594 17.1002 6.08594 17.5869C6.08594 18.0737 6.48054 18.4683 6.9673 18.4683H33.0307C33.5174 18.4683 33.912 18.0737 33.912 17.5869C33.912 17.1002 33.5174 16.7056 33.0307 16.7056H6.9673ZM6.08594 21.4618C6.08594 20.975 6.48054 20.5804 6.9673 20.5804H33.0307C33.5174 20.5804 33.912 20.975 33.912 21.4618C33.912 21.9486 33.5174 22.3432 33.0307 22.3432H6.9673C6.48054 22.3432 6.08594 21.9486 6.08594 21.4618ZM21.4704 42.6691C21.1241 42.239 20.5919 42.0085 20.0457 42.0521H19.166V47.0441H20.0251C20.352 47.0567 20.6773 46.9886 20.9727 46.8469C21.213 46.7226 21.4156 46.5345 21.5589 46.3032C21.7076 46.0577 21.8089 45.7862 21.8582 45.5029C21.9164 45.1846 21.9455 44.8615 21.9451 44.5377C21.951 44.1698 21.9106 43.8023 21.8252 43.4446C21.758 43.1653 21.6373 42.9016 21.4704 42.6691ZM13.7445 42.0508C14.085 42.0213 14.4258 42.1008 14.7193 42.2782C14.8136 42.3518 14.8858 42.4501 14.9282 42.5627C14.9825 42.7134 15.0077 42.8731 15.0019 43.0333C15.0093 43.1969 14.9728 43.3594 14.8967 43.5039C14.8311 43.6211 14.7352 43.7175 14.6195 43.7832C14.4961 43.8525 14.361 43.8981 14.2212 43.9182C14.0636 43.9426 13.9041 43.9548 13.7445 43.9544H12.6855V42.0508H13.7445Z",
68
+ fill: "#00236A"
69
+ }));
70
+
38
71
  function styleInject(css, ref) {
39
72
  if ( ref === void 0 ) ref = {};
40
73
  var insertAt = ref.insertAt;
@@ -62,15 +95,10 @@ function styleInject(css, ref) {
62
95
  }
63
96
  }
64
97
 
65
- var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:2.5rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
98
+ var css_248z$e = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
66
99
  var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
67
100
  styleInject(css_248z$e);
68
101
 
69
- var css_248z$d = "";
70
- styleInject(css_248z$d);
71
-
72
- var pdfImage = "<svg width=\"40\" height=\"52\" viewBox=\"0 0 40 52\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M39.1304 13.1106V36.2849V36.2853C39.394 36.4388 39.6133 36.6599 39.7659 36.9263C39.9189 37.1931 39.9992 37.4956 40 37.8037V47.5932C39.9984 48.7614 39.54 49.8816 38.7252 50.7079C37.91 51.5337 36.8048 51.9984 35.6522 52H4.34783C3.19523 51.9984 2.09005 51.5338 1.27483 50.7079C0.460015 49.8816 0.0015528 48.7614 0 47.5932V34.7817C0.000775155 34.4736 0.0815204 34.1714 0.234087 33.9051C0.386643 33.6383 0.605983 33.4176 0.869565 33.2641V3.52545C0.869565 2.5906 1.23602 1.69387 1.8882 1.03245C2.54072 0.371431 3.42547 0 4.34783 0H26.1953L39.1304 13.1106ZM13.872 45.3893C14.6037 45.4385 15.3293 45.2261 15.9225 44.7893C16.4303 44.3463 16.7036 43.6872 16.6605 43.0096C16.671 42.6272 16.598 42.2471 16.4478 41.8965C16.3154 41.6026 16.1136 41.3464 15.8597 41.1509C15.5976 40.9542 15.2991 40.8137 14.9816 40.7385C14.6225 40.6512 14.2541 40.6083 13.8849 40.6115H11.0258V48.4741H12.6849V45.3893H13.872ZM22.6954 47.4563C23.0149 47.1041 23.2498 46.6815 23.3814 46.2224C23.5347 45.6809 23.6084 45.1195 23.5999 44.5564C23.6065 44.008 23.5362 43.4614 23.3918 42.933C23.2672 42.477 23.0475 42.0532 22.7474 41.6904C22.4465 41.3379 22.0669 41.064 21.6398 40.8917C21.1305 40.6934 20.5882 40.5982 20.0432 40.6116H17.506V48.4821H20.0642C21.0475 48.5494 22.0103 48.1743 22.6954 47.4563ZM26.1252 42.05H29.4956L29.4956 40.6115H24.4661V48.4804L26.1287 48.4808V45.1068L28.6505 45.0962L28.64 43.6577H26.1252V42.05ZM18.3352 36.0407H37.3911L37.3908 14.3567H28.4428C27.5205 14.3567 26.6358 13.9852 25.9836 13.3238C25.331 12.6628 24.9646 11.7661 24.9646 10.8312V1.76186H4.34743C3.88625 1.76186 3.4437 1.94758 3.11762 2.27808C2.79153 2.60859 2.6083 3.05715 2.6083 3.52458V33.0185H14.9392C15.4408 33.0185 15.9179 33.238 16.2482 33.6205L18.3352 36.0407ZM6.08594 13.7151C6.08594 13.2283 6.48054 12.8337 6.9673 12.8337H20.6043C21.0911 12.8337 21.4857 13.2283 21.4857 13.7151C21.4857 14.2019 21.0911 14.5965 20.6043 14.5965H6.9673C6.48054 14.5965 6.08594 14.2019 6.08594 13.7151ZM18.5137 25.3369C18.5137 24.8502 18.9083 24.4556 19.395 24.4556H33.0321C33.5188 24.4556 33.9134 24.8502 33.9134 25.3369C33.9134 25.8237 33.5188 26.2183 33.0321 26.2183H19.395C18.9083 26.2183 18.5137 25.8237 18.5137 25.3369ZM6.9673 16.7056C6.48054 16.7056 6.08594 17.1002 6.08594 17.5869C6.08594 18.0737 6.48054 18.4683 6.9673 18.4683H33.0307C33.5174 18.4683 33.912 18.0737 33.912 17.5869C33.912 17.1002 33.5174 16.7056 33.0307 16.7056H6.9673ZM6.08594 21.4618C6.08594 20.975 6.48054 20.5804 6.9673 20.5804H33.0307C33.5174 20.5804 33.912 20.975 33.912 21.4618C33.912 21.9486 33.5174 22.3432 33.0307 22.3432H6.9673C6.48054 22.3432 6.08594 21.9486 6.08594 21.4618ZM21.4704 42.6691C21.1241 42.239 20.5919 42.0085 20.0457 42.0521H19.166V47.0441H20.0251C20.352 47.0567 20.6773 46.9886 20.9727 46.8469C21.213 46.7226 21.4156 46.5345 21.5589 46.3032C21.7076 46.0577 21.8089 45.7862 21.8582 45.5029C21.9164 45.1846 21.9455 44.8615 21.9451 44.5377C21.951 44.1698 21.9106 43.8023 21.8252 43.4446C21.758 43.1653 21.6373 42.9016 21.4704 42.6691ZM13.7445 42.0508C14.085 42.0213 14.4258 42.1008 14.7193 42.2782C14.8136 42.3518 14.8858 42.4501 14.9282 42.5627C14.9825 42.7134 15.0077 42.8731 15.0019 43.0333C15.0093 43.1969 14.9728 43.3594 14.8967 43.5039C14.8311 43.6211 14.7352 43.7175 14.6195 43.7832C14.4961 43.8525 14.361 43.8981 14.2212 43.9182C14.0636 43.9426 13.9041 43.9548 13.7445 43.9544H12.6855V42.0508H13.7445Z\" fill=\"#00236A\"/>\n</svg>";
73
-
74
102
  const File = ({
75
103
  name,
76
104
  label,
@@ -84,9 +112,9 @@ const File = ({
84
112
  fileExtensions,
85
113
  ...props
86
114
  }) => {
87
- const [image, setImage] = React.useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : pdfImage : null);
88
115
  const [error, setError] = React.useState('');
89
116
  const [fileName, setFileName] = React.useState('no selected file');
117
+ const [image, setImage] = React.useState(defaultData ? defaultData.type != 'application/pdf' ? defaultData.url : 'pdf' : null);
90
118
  const handleCheckFile = e => {
91
119
  const file = e.target.files;
92
120
  if (file[0]) {
@@ -97,7 +125,7 @@ const File = ({
97
125
  onChange({
98
126
  file
99
127
  });
100
- setImage(pdfImage);
128
+ setImage('pdf');
101
129
  } else {
102
130
  setError('');
103
131
  onChange({
@@ -139,8 +167,7 @@ const File = ({
139
167
  }, "*")), /*#__PURE__*/React__default["default"].createElement("div", {
140
168
  className: classnames__default["default"](`${styles$c['file-form-wrap']} file-form-wrap-rem`, image ? styles$c['active'] : '')
141
169
  }, /*#__PURE__*/React__default["default"].createElement("div", {
142
- onChange: e => console.log(e),
143
- className: `${styles$c['file-form']} file-form-rem ${errorMessage ? styles$c['error'] : ''}`,
170
+ className: `${styles$c['file-form']} file-form-rem ${error || errorMessage ? styles$c['error'] : ''}`,
144
171
  onClick: () => document.querySelector(`.${name}`).click()
145
172
  }, /*#__PURE__*/React__default["default"].createElement("input", {
146
173
  hidden: true,
@@ -150,7 +177,7 @@ const File = ({
150
177
  onChange: e => handleCheckFile(e)
151
178
  }), image ? /*#__PURE__*/React__default["default"].createElement("div", {
152
179
  className: `${styles$c['upload-file-content']} upload-file-content-rem`
153
- }, /*#__PURE__*/React__default["default"].createElement("img", {
180
+ }, image === 'pdf' ? /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : /*#__PURE__*/React__default["default"].createElement("img", {
154
181
  src: image,
155
182
  alt: fileName
156
183
  })) : /*#__PURE__*/React__default["default"].createElement("div", {
@@ -169,11 +196,11 @@ const File = ({
169
196
  onClick: handleRemoveFile
170
197
  }, /*#__PURE__*/React__default["default"].createElement("i", {
171
198
  className: "icon-delete"
172
- })), errorMessage || error ? /*#__PURE__*/React__default["default"].createElement("span", {
199
+ })), error || errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
173
200
  style: {
174
201
  color: 'red'
175
202
  }
176
- }, errorMessage || error) : null));
203
+ }, error || errorMessage) : null));
177
204
  };
178
205
  File.propTypes = {
179
206
  label: PropTypes__default["default"].string,
@@ -192,28 +219,13 @@ File.defaultProps = {
192
219
  fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
193
220
  };
194
221
 
195
- var css_248z$c = ".table-module_table-wrap__KKAnM{background:#fff;border-radius:14px 14px 0 0;box-shadow:0 10px 30px rgba(0,35,106,.06);overflow:hidden;width:100%}.table-module_table-wrap__KKAnM:not(:first-child){margin-top:30px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:first-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:first-child{flex:0 0 auto;width:60px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(2),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(2){flex:0 0 auto;width:120px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(3),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(3){flex:0 0 auto;width:170px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(4),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(4){flex:0 0 auto;width:126px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(5),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(6),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(8),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(5),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(6),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(8){flex:0 0 auto;width:100px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:last-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:last-child{flex:0 0 auto;width:104px}.table-module_table-top__tfEKM{background:#00236a;height:44px;width:100%}.table-module_table-top__tfEKM .table-module_table-items__UpFg2{align-items:center;color:#fff;display:flex;flex:1 1;font-size:15px;justify-content:center;line-height:17px;text-align:center}.table-module_table-bottom-inner__0Pus0{background:#fff;min-height:40px;width:100%}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2{align-items:center;border-bottom:1px solid #eee;display:flex;flex:1 1;font-size:14px;justify-content:center;line-height:16px;padding:4px;text-align:center}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:not(:last-child){border-right:1px solid #eee}";
222
+ var css_248z$d = ".table-module_table-wrap__KKAnM{background:#fff;border-radius:14px 14px 0 0;box-shadow:0 10px 30px rgba(0,35,106,.06);overflow:hidden;width:100%}.table-module_table-wrap__KKAnM:not(:first-child){margin-top:30px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:first-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:first-child{flex:0 0 auto;width:60px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(2),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(2){flex:0 0 auto;width:120px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(3),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(3){flex:0 0 auto;width:170px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(4),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(4){flex:0 0 auto;width:126px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(5),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(6),.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:nth-child(8),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(5),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(6),.table-module_table-top__tfEKM .table-module_table-items__UpFg2:nth-child(8){flex:0 0 auto;width:100px}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:last-child,.table-module_table-top__tfEKM .table-module_table-items__UpFg2:last-child{flex:0 0 auto;width:104px}.table-module_table-top__tfEKM{background:#00236a;height:44px;width:100%}.table-module_table-top__tfEKM .table-module_table-items__UpFg2{align-items:center;color:#fff;display:flex;flex:1 1;font-size:15px;justify-content:center;line-height:17px;text-align:center}.table-module_table-bottom-inner__0Pus0{background:#fff;min-height:40px;width:100%}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2{align-items:center;border-bottom:1px solid #eee;display:flex;flex:1 1;font-size:14px;justify-content:center;line-height:16px;padding:4px;text-align:center}.table-module_table-bottom-inner__0Pus0 .table-module_table-items__UpFg2:not(:last-child){border-right:1px solid #eee}";
196
223
  var styles$b = {"table-wrap":"table-module_table-wrap__KKAnM","table-bottom-inner":"table-module_table-bottom-inner__0Pus0","table-items":"table-module_table-items__UpFg2","table-top":"table-module_table-top__tfEKM"};
197
- styleInject(css_248z$c);
198
-
199
- function _extends() {
200
- _extends = Object.assign ? Object.assign.bind() : function (target) {
201
- for (var i = 1; i < arguments.length; i++) {
202
- var source = arguments[i];
203
- for (var key in source) {
204
- if (Object.prototype.hasOwnProperty.call(source, key)) {
205
- target[key] = source[key];
206
- }
207
- }
208
- }
209
- return target;
210
- };
211
- return _extends.apply(this, arguments);
212
- }
224
+ styleInject(css_248z$d);
213
225
 
214
- var css_248z$b = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;bottom:0;display:inline-block;height:14px;left:0;margin:auto 4px auto auto;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
226
+ var css_248z$c = ".checkbox-module_checkbox-wrap__Xrg-m{align-items:center;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;margin:0 6px;padding-left:24px;position:relative}.checkbox-module_checkbox-wrap__Xrg-m>input{height:0;opacity:0;position:absolute;width:0}.checkbox-module_checkbox-wrap__Xrg-m .checkbox-module_checkmark__M8DY6{border:1px solid #d9d9d9;border-radius:3px;bottom:0;display:inline-block;height:14px;left:0;margin:auto 4px auto auto;position:absolute;top:0;transition:border-color .24s;vertical-align:top;width:14px}.checkbox-module_checkbox-wrap__Xrg-m>.checkbox-module_checkmark__M8DY6:after{border:solid #1890ff;border-width:0 2px 2px 0;content:\"\";display:block;height:8px;left:4px;opacity:0;position:absolute;top:1px;transform:rotate(45deg);transition:opacity .24s;width:4px}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6:after{opacity:1}.checkbox-module_checkbox-wrap__Xrg-m input:checked~.checkbox-module_checkmark__M8DY6,.checkbox-module_checkbox-wrap__Xrg-m:hover input~.checkbox-module_checkmark__M8DY6{border-color:#1890ff}";
215
227
  var styles$a = {"checkbox-wrap":"checkbox-module_checkbox-wrap__Xrg-m","checkmark":"checkbox-module_checkmark__M8DY6"};
216
- styleInject(css_248z$b);
228
+ styleInject(css_248z$c);
217
229
 
218
230
  const Checkbox = ({
219
231
  disabled,
@@ -387,8 +399,11 @@ Table.defaultProps = {
387
399
  hearderData: []
388
400
  };
389
401
 
390
- var css_248z$a = ".modal-module_modal-wrap__IsXXf{background:rgba(0,0,0,.4);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9}.modal-module_modal-top__ntDBi{background:#fbfbfb;box-sizing:border-box;display:flex;flex-direction:row;height:44px;padding:4px 10px 4px 0;width:100%}.modal-module_modal-title__r-WKl{align-items:center;color:#3c393e;display:flex;flex:1 1;font-size:20px;font-weight:500;line-height:24px;padding-right:20px}.modal-module_close-btn__Qf2UD{cursor:pointer;flex:0 0 auto;width:24px}.modal-module_close-btn__Qf2UD,.modal-module_modal-section__Bp8jN{align-items:center;display:flex;height:100%;justify-content:center}.modal-module_modal-section__Bp8jN{flex:1 1;padding:10px 0;width:100%}.modal-module_modal-content__1F-uE{align-items:center;animation:modal-module_show-popup__WrH7a .24s;background:#fff;border-radius:8px;display:flex;flex-direction:column;height:auto;left:0;margin:auto;min-height:130px;overflow:hidden;padding:10px;position:absolute;right:0;top:110px;width:fit-content}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-30%,0)}to{opacity:1;transform:translateZ(0)}}";
402
+ var css_248z$b = ".modal-module_modal-wrap__IsXXf{background:rgba(0,0,0,.4);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9}.modal-module_modal-top__ntDBi{background:#fbfbfb;box-sizing:border-box;display:flex;flex-direction:row;height:44px;padding:4px 10px 4px 0;width:100%}.modal-module_modal-title__r-WKl{align-items:center;color:#3c393e;display:flex;flex:1 1;font-size:20px;font-weight:500;line-height:24px;padding-right:20px}.modal-module_close-btn__Qf2UD{cursor:pointer;flex:0 0 auto;width:24px}.modal-module_close-btn__Qf2UD,.modal-module_modal-section__Bp8jN{align-items:center;display:flex;height:100%;justify-content:center}.modal-module_modal-section__Bp8jN{flex:1 1;padding:10px 0;width:100%}.modal-module_modal-content__1F-uE{align-items:center;animation:modal-module_show-popup__WrH7a .24s;background:#fff;border-radius:8px;display:flex;flex-direction:column;height:auto;left:0;margin:auto;min-height:130px;overflow:hidden;padding:10px;position:absolute;right:0;top:110px;width:fit-content}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-30%,0)}to{opacity:1;transform:translateZ(0)}}";
391
403
  var styles$9 = {"modal-wrap":"modal-module_modal-wrap__IsXXf","modal-top":"modal-module_modal-top__ntDBi","modal-title":"modal-module_modal-title__r-WKl","close-btn":"modal-module_close-btn__Qf2UD","modal-section":"modal-module_modal-section__Bp8jN","modal-content":"modal-module_modal-content__1F-uE","show-popup":"modal-module_show-popup__WrH7a"};
404
+ styleInject(css_248z$b);
405
+
406
+ var css_248z$a = "";
392
407
  styleInject(css_248z$a);
393
408
 
394
409
  const _ = require('lodash');
@@ -641,7 +656,7 @@ const Input = ({
641
656
  errorAnimationDuration,
642
657
  ...props
643
658
  }) => {
644
- const phoneNumberRegex = /^\d{8}$/;
659
+ const phoneNumberRegex = /^\d+$/;
645
660
  const [show, setShow] = React.useState(false);
646
661
  const [isHover, setIsHover] = React.useState(false);
647
662
  const [innerValue, setInnerValue] = React.useState('');
@@ -669,28 +684,34 @@ const Input = ({
669
684
  const currentValue = event.target.value;
670
685
  setInnerValue(currentValue);
671
686
  if (type === 'tel') {
672
- if (currentValue.length > 8) {
673
- setInnerValue(currentValue.substr(0, 8));
674
- }
675
- if (!phoneNumberRegex.test(currentValue) && telErrorMessage) {
676
- setInnerErrorMessage(telErrorMessage);
687
+ if (!phoneNumberRegex.test(currentValue)) {
688
+ telErrorMessage && setInnerErrorMessage(telErrorMessage);
689
+ setInnerValue('');
677
690
  } else {
678
691
  setInnerErrorMessage('');
692
+ if (currentValue.length > 8) {
693
+ setInnerValue(currentValue.substr(0, 8));
694
+ if (onChange) {
695
+ onChange(currentValue.substr(0, 8));
696
+ }
697
+ } else {
698
+ setInnerValue(currentValue);
699
+ if (onChange) {
700
+ onChange(currentValue);
701
+ }
702
+ }
679
703
  }
680
704
  }
681
705
  if (maxLength && currentValue.length > maxLength && type !== 'tel') {
682
706
  setInnerValue(currentValue.substr(0, maxLength));
707
+ if (onChange) {
708
+ onChange(currentValue.substr(0, maxLength));
709
+ }
683
710
  }
684
711
  if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
685
712
  !regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
686
- }
687
- if (onChange) {
688
- onChange(currentValue);
689
- if (type === 'tel' && currentValue.length > 8) {
690
- onChange(currentValue.substr(0, 8));
691
- }
692
- if (maxLength && currentValue.length > maxLength && type !== 'tel') {
693
- onChange(currentValue.substr(0, maxLength));
713
+ if (onChange) {
714
+ onChange(currentValue);
694
715
  }
695
716
  }
696
717
  };
@@ -701,16 +722,24 @@ const Input = ({
701
722
  setIsHover(false);
702
723
  };
703
724
  React.useEffect(() => {
725
+ if (errorMessage) {
726
+ setInnerErrorMessage(errorMessage);
727
+ } else {
728
+ setInnerErrorMessage('');
729
+ }
704
730
  if (value !== undefined && value !== null) {
705
731
  setInnerValue(value);
706
732
  if (type === 'tel') {
707
- if (value.length > 8) {
708
- setInnerValue(value.substr(0, 8));
709
- }
710
- if (!phoneNumberRegex.test(value) && telErrorMessage) {
711
- setInnerErrorMessage(telErrorMessage);
733
+ if (!phoneNumberRegex.test(currentValue)) {
734
+ telErrorMessage && setInnerErrorMessage(telErrorMessage);
735
+ setInnerValue('');
712
736
  } else {
713
737
  setInnerErrorMessage('');
738
+ if (value.length > 8) {
739
+ setInnerValue(value.substr(0, 8));
740
+ } else {
741
+ setInnerValue(value);
742
+ }
714
743
  }
715
744
  }
716
745
  if (maxLength && value.length > maxLength && type !== 'tel') {
@@ -720,11 +749,6 @@ const Input = ({
720
749
  !regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
721
750
  }
722
751
  }
723
- if (errorMessage) {
724
- setInnerErrorMessage(errorMessage);
725
- } else {
726
- setInnerErrorMessage('');
727
- }
728
752
  }, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage]);
729
753
  return /*#__PURE__*/React__default["default"].createElement("div", {
730
754
  className: `${styles$8["input-wrap"]}`
@@ -1038,8 +1062,8 @@ const SvgCheckboxUnchecked = ({
1038
1062
  titleId,
1039
1063
  ...props
1040
1064
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1041
- width: "1em",
1042
- height: "1em",
1065
+ width: "16",
1066
+ height: "16",
1043
1067
  viewBox: "0 0 16 16",
1044
1068
  fill: "none",
1045
1069
  xmlns: "http://www.w3.org/2000/svg",
@@ -1058,8 +1082,8 @@ const SvgCheckboxChecked = ({
1058
1082
  titleId,
1059
1083
  ...props
1060
1084
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1061
- width: "1em",
1062
- height: "1em",
1085
+ width: "16",
1086
+ height: "16",
1063
1087
  viewBox: "0 0 16 16",
1064
1088
  fill: "none",
1065
1089
  xmlns: "http://www.w3.org/2000/svg",
@@ -1091,8 +1115,8 @@ const SvgArrow = ({
1091
1115
  titleId,
1092
1116
  ...props
1093
1117
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1094
- width: "1em",
1095
- height: "1em",
1118
+ width: "15",
1119
+ height: "9",
1096
1120
  viewBox: "0 0 15 9",
1097
1121
  fill: "none",
1098
1122
  xmlns: "http://www.w3.org/2000/svg",
@@ -1109,8 +1133,8 @@ const SvgCloseIcon = ({
1109
1133
  titleId,
1110
1134
  ...props
1111
1135
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1112
- width: "1em",
1113
- height: "1em",
1136
+ width: "14",
1137
+ height: "14",
1114
1138
  viewBox: "0 0 14 14",
1115
1139
  fill: "none",
1116
1140
  xmlns: "http://www.w3.org/2000/svg",
@@ -1443,8 +1467,8 @@ const SvgToasterInfo = ({
1443
1467
  titleId,
1444
1468
  ...props
1445
1469
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1446
- width: "1em",
1447
- height: "1em",
1470
+ width: "24",
1471
+ height: "24",
1448
1472
  viewBox: "0 0 24 24",
1449
1473
  fill: "none",
1450
1474
  xmlns: "http://www.w3.org/2000/svg",
@@ -1461,8 +1485,8 @@ const SvgToasterError = ({
1461
1485
  titleId,
1462
1486
  ...props
1463
1487
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1464
- width: "1em",
1465
- height: "1em",
1488
+ width: "24",
1489
+ height: "24",
1466
1490
  viewBox: "0 0 24 24",
1467
1491
  fill: "none",
1468
1492
  xmlns: "http://www.w3.org/2000/svg",
@@ -1479,8 +1503,8 @@ const SvgToasterClose = ({
1479
1503
  titleId,
1480
1504
  ...props
1481
1505
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1482
- width: "1em",
1483
- height: "1em",
1506
+ width: "18",
1507
+ height: "18",
1484
1508
  viewBox: "0 0 18 18",
1485
1509
  fill: "none",
1486
1510
  xmlns: "http://www.w3.org/2000/svg",
@@ -1497,8 +1521,8 @@ const SvgToasterWarning = ({
1497
1521
  titleId,
1498
1522
  ...props
1499
1523
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1500
- width: "1em",
1501
- height: "1em",
1524
+ width: "24",
1525
+ height: "24",
1502
1526
  viewBox: "0 0 24 21",
1503
1527
  fill: "none",
1504
1528
  xmlns: "http://www.w3.org/2000/svg",
@@ -1515,8 +1539,8 @@ const SvgToasterSuccess = ({
1515
1539
  titleId,
1516
1540
  ...props
1517
1541
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1518
- width: "1em",
1519
- height: "1em",
1542
+ width: "24",
1543
+ height: "24",
1520
1544
  viewBox: "0 0 24 24",
1521
1545
  fill: "none",
1522
1546
  xmlns: "http://www.w3.org/2000/svg",
@@ -1615,12 +1639,12 @@ const Toast = ({
1615
1639
  }
1616
1640
  }, /*#__PURE__*/React__default["default"].createElement("p", {
1617
1641
  style: {
1642
+ margin: '0px',
1618
1643
  fontWeight: 600,
1619
1644
  color: '#3C393E',
1620
1645
  fontSize: '16px',
1621
1646
  lineHeight: '22px',
1622
- fontStyle: 'normal',
1623
- fontFamily: ''
1647
+ fontStyle: 'normal'
1624
1648
  }
1625
1649
  }, title ? title.length > 25 ? title.substr(0, 25) + '...' : title : ''), /*#__PURE__*/React__default["default"].createElement("span", {
1626
1650
  style: {
@@ -1784,7 +1808,23 @@ const Toaster = () => {
1784
1808
  });
1785
1809
  };
1786
1810
 
1787
- var ReactInfoIcon = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M8 0C3.58214 0 0 3.58214 0 8C0 12.4179 3.58214 16 8 16C12.4179 16 16 12.4179 16 8C16 3.58214 12.4179 0 8 0ZM8.57143 11.8571C8.57143 11.9357 8.50714 12 8.42857 12H7.57143C7.49286 12 7.42857 11.9357 7.42857 11.8571V7C7.42857 6.92143 7.49286 6.85714 7.57143 6.85714H8.42857C8.50714 6.85714 8.57143 6.92143 8.57143 7V11.8571ZM8 5.71429C7.7757 5.70971 7.56213 5.61739 7.40513 5.45714C7.24812 5.2969 7.16018 5.08149 7.16018 4.85714C7.16018 4.6328 7.24812 4.41739 7.40513 4.25714C7.56213 4.0969 7.7757 4.00458 8 4C8.2243 4.00458 8.43787 4.0969 8.59488 4.25714C8.75189 4.41739 8.83982 4.6328 8.83982 4.85714C8.83982 5.08149 8.75189 5.2969 8.59488 5.45714C8.43787 5.61739 8.2243 5.70971 8 5.71429Z\" fill=\"#D1D1D1\"/>\n</svg>";
1811
+ const SvgTooltip = ({
1812
+ title,
1813
+ titleId,
1814
+ ...props
1815
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1816
+ width: "16",
1817
+ height: "16",
1818
+ viewBox: "0 0 16 16",
1819
+ fill: "none",
1820
+ xmlns: "http://www.w3.org/2000/svg",
1821
+ "aria-labelledby": titleId
1822
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
1823
+ id: titleId
1824
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
1825
+ d: "M8 0a8 8 0 1 0 .001 16.001A8 8 0 0 0 8 0Zm.571 11.857A.143.143 0 0 1 8.43 12H7.57a.143.143 0 0 1-.142-.143V7c0-.079.064-.143.142-.143h.858c.078 0 .142.064.142.143v4.857ZM8 5.714A.857.857 0 0 1 8 4a.857.857 0 0 1 0 1.714Z",
1826
+ fill: "#D1D1D1"
1827
+ }));
1788
1828
 
1789
1829
  var css_248z$5 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
1790
1830
  var styles$4 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
@@ -1860,9 +1900,7 @@ const Tooltip = ({
1860
1900
  cursor: 'pointer'
1861
1901
  },
1862
1902
  onClick: handleShow
1863
- }, tooltipIcon ? tooltipIcon : /*#__PURE__*/React__default["default"].createElement("img", {
1864
- src: ReactInfoIcon
1865
- })));
1903
+ }, tooltipIcon ? tooltipIcon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
1866
1904
  };
1867
1905
  Tooltip.propTypes = {
1868
1906
  type: PropTypes__default["default"].string,
@@ -1884,71 +1922,164 @@ Tooltip.defaultProps = {
1884
1922
  type: 'top'
1885
1923
  };
1886
1924
 
1887
- var css_248z$4 = "*{margin:0;padding:0}.captcha-module_main__Ys3EH{height:74px;max-width:400px;position:relative;width:100%}.captcha-module_slider__KLYny{-webkit-appearance:none;background:#eee;border-radius:2px;bottom:0;height:4px;left:0;margin:auto 0;outline:none;position:absolute;top:0;width:100%}.captcha-module_slider__KLYny::-webkit-slider-thumb{-webkit-appearance:none;height:30px;position:relative;width:30px;z-index:3}.captcha-module_selector__JFhb4{left:0;z-index:2}.captcha-module_selectBtn__GP1iH,.captcha-module_selector__JFhb4{bottom:0;height:30px;margin:auto 0;position:absolute;top:0;width:30px}.captcha-module_selectBtn__GP1iH{background:#00236a;border:2px solid #fff;border-radius:50%;box-shadow:1px 0 6px rgba(60,57,62,.15);cursor:pointer}.captcha-module_progressBar__mhdtM{background:red;bottom:0;height:4px;left:0;margin:auto 0;position:absolute;top:0;width:auto}.captcha-module_range__k24I2{color:blue;margin-bottom:15px;margin-top:15px}";
1888
- var styles$3 = {"main":"captcha-module_main__Ys3EH","slider":"captcha-module_slider__KLYny","selector":"captcha-module_selector__JFhb4","selectBtn":"captcha-module_selectBtn__GP1iH","progressBar":"captcha-module_progressBar__mhdtM","range":"captcha-module_range__k24I2"};
1925
+ const SvgCaptchaArrowUp = ({
1926
+ title,
1927
+ titleId,
1928
+ ...props
1929
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1930
+ width: "12",
1931
+ height: "15",
1932
+ viewBox: "0 0 12 15",
1933
+ fill: "none",
1934
+ xmlns: "http://www.w3.org/2000/svg",
1935
+ "aria-labelledby": titleId
1936
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
1937
+ id: titleId
1938
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
1939
+ d: "M6 14.9988C6.22729 14.9988 6.44527 14.9066 6.60598 14.7425C6.7667 14.5785 6.85699 14.3559 6.85699 14.1239L6.85699 3.98726L10.5352 7.74409C10.6149 7.82543 10.7095 7.88996 10.8136 7.93398C10.9177 7.97801 11.0292 8.00067 11.1419 8.00067C11.2546 8.00067 11.3662 7.97801 11.4703 7.93398C11.5744 7.88996 11.669 7.82543 11.7487 7.74409C11.8284 7.66274 11.8916 7.56617 11.9347 7.45989C11.9778 7.35361 12 7.2397 12 7.12466C12 7.00962 11.9778 6.89571 11.9347 6.78943C11.8916 6.68314 11.8284 6.58657 11.7487 6.50523L6.60675 1.25581C6.52714 1.17434 6.43257 1.1097 6.32845 1.06559C6.22434 1.02148 6.11272 0.998779 6 0.998779C5.88728 0.998779 5.77566 1.02148 5.67154 1.06559C5.56743 1.1097 5.47286 1.17434 5.39325 1.25581L0.251323 6.50523C0.0904038 6.66951 0 6.89233 0 7.12466C0 7.35699 0.0904038 7.57981 0.251323 7.74409C0.412243 7.90837 0.630497 8.00067 0.858071 8.00067C1.08565 8.00067 1.3039 7.90837 1.46482 7.74409L5.14301 3.98726L5.14301 14.1239C5.14301 14.3559 5.2333 14.5785 5.39402 14.7425C5.55473 14.9066 5.77271 14.9988 6 14.9988Z",
1940
+ fill: "#00236A"
1941
+ }));
1942
+
1943
+ const SvgCaptchaArrowDown = ({
1944
+ title,
1945
+ titleId,
1946
+ ...props
1947
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
1948
+ width: "12",
1949
+ height: "15",
1950
+ viewBox: "0 0 12 15",
1951
+ fill: "none",
1952
+ xmlns: "http://www.w3.org/2000/svg",
1953
+ "aria-labelledby": titleId
1954
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
1955
+ id: titleId
1956
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
1957
+ d: "M6 0.00146537C5.77271 0.00146539 5.55473 0.0936418 5.39402 0.257718C5.2333 0.421795 5.14301 0.64433 5.14301 0.876368L5.14301 11.013L1.46482 7.25615C1.38514 7.17481 1.29055 7.11028 1.18644 7.06626C1.08233 7.02224 0.970753 6.99958 0.85807 6.99958C0.745386 6.99958 0.633807 7.02224 0.529701 7.06626C0.425595 7.11028 0.331002 7.17481 0.251322 7.25616C0.171643 7.3375 0.108438 7.43407 0.0653156 7.54035C0.0221934 7.64663 -5.45598e-07 7.76055 -5.35541e-07 7.87559C-5.25484e-07 7.99063 0.0221934 8.10454 0.0653157 8.21082C0.108438 8.3171 0.171643 8.41367 0.251322 8.49502L5.39325 13.7444C5.47286 13.8259 5.56743 13.8905 5.67155 13.9347C5.77566 13.9788 5.88728 14.0015 6 14.0015C6.11272 14.0015 6.22434 13.9788 6.32846 13.9347C6.43257 13.8905 6.52714 13.8259 6.60675 13.7444L11.7487 8.49502C11.9096 8.33073 12 8.10792 12 7.87559C12 7.64325 11.9096 7.42044 11.7487 7.25615C11.5878 7.09187 11.3695 6.99958 11.1419 6.99958C10.9144 6.99958 10.6961 7.09187 10.5352 7.25615L6.85699 11.013L6.85699 0.876368C6.85699 0.64433 6.7667 0.421794 6.60598 0.257718C6.44526 0.0936418 6.22729 0.00146535 6 0.00146537Z",
1958
+ fill: "#00236A"
1959
+ }));
1960
+
1961
+ var css_248z$4 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
1962
+ var styles$3 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
1889
1963
  styleInject(css_248z$4);
1890
1964
 
1891
1965
  const Captcha = ({
1892
- onclick,
1893
- rangeCount
1966
+ size,
1967
+ color,
1968
+ range,
1969
+ label,
1970
+ getRange
1894
1971
  }) => {
1895
- const [data, setData] = React.useState("");
1896
- const [right, setRight] = React.useState(false);
1897
- let range = rangeCount <= 100 ? rangeCount : 0;
1898
- let rangeElement = document.getElementsByClassName(styles$3.range);
1972
+ const [rangeNumber, setRangeNumber] = React.useState(0);
1973
+ const [rangeProgress, setRangeProgress] = React.useState(0);
1974
+ const configStyles = compereConfigs();
1975
+ const handleRange = e => {
1976
+ const value = e.target.value;
1977
+ getRange(value);
1978
+ setRangeProgress(value);
1979
+ };
1899
1980
  React.useEffect(() => {
1900
- for (let element of rangeElement) {
1901
- element.style.marginLeft = `${range + 60}%`;
1902
- element.style.color = data;
1903
- }
1904
- }, [range, data]);
1905
- function sliderInput(event) {
1906
- setData(rangeCount == event.target.value ? 'green' : 'indianred');
1907
- let selector = document.getElementsByClassName(styles$3.selector);
1908
- let selectBtn = document.getElementsByClassName(styles$3.selectBtn);
1909
- let progressBar = document.getElementsByClassName(styles$3.progressBar);
1910
- selector[0].style.left = event.target.value + '%';
1911
- progressBar[0].style.width = event.target.value + '%';
1912
- if (rangeCount == event.target.value) {
1913
- selectBtn[0].style.background = "pink";
1981
+ if (range === undefined || range === null) {
1982
+ alert('Please add range property on Captcha component');
1983
+ }
1984
+ if (!getRange) {
1985
+ alert('Please add getRange property on Captcha component');
1986
+ }
1987
+ if (range >= 100) {
1988
+ setRangeNumber(100);
1989
+ } else if (range <= 0) {
1990
+ setRangeNumber(0);
1914
1991
  } else {
1915
- selectBtn[0].style.background = "red";
1992
+ const roundedRange = Math.ceil(range / 5) * 5;
1993
+ setRangeNumber(Math.min(roundedRange, 100));
1994
+ }
1995
+ }, [range, getRange]);
1996
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label && /*#__PURE__*/React__default["default"].createElement("p", {
1997
+ style: {
1998
+ fontSize: size ? size : configStyles.Captcha.size,
1999
+ color: color ? color : configStyles.Captcha.color
2000
+ }
2001
+ }, label), /*#__PURE__*/React__default["default"].createElement("div", {
2002
+ style: {
2003
+ width: '100%',
2004
+ height: '76px',
2005
+ maxWidth: '400px',
2006
+ position: 'relative'
1916
2007
  }
1917
- }
1918
- function sliderChange(e) {
1919
- setRight(rangeCount == e.target.value ? true : false);
1920
- }
1921
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
1922
- className: styles$3.main
1923
2008
  }, /*#__PURE__*/React__default["default"].createElement("div", {
1924
- className: styles$3.range
1925
- }, /*#__PURE__*/React__default["default"].createElement("i", {
1926
- className: "icon-vector-down"
1927
- })), /*#__PURE__*/React__default["default"].createElement("input", {
2009
+ style: {
2010
+ position: 'absolute',
2011
+ top: '0px',
2012
+ height: '15px',
2013
+ left: `calc(${rangeNumber}% - 6px)`
2014
+ }
2015
+ }, /*#__PURE__*/React__default["default"].createElement(SvgCaptchaArrowDown, null)), /*#__PURE__*/React__default["default"].createElement("div", {
2016
+ style: {
2017
+ position: 'absolute',
2018
+ display: 'flex',
2019
+ top: '23px',
2020
+ left: '0px',
2021
+ width: '100%',
2022
+ height: '30px',
2023
+ alignItems: 'center',
2024
+ zIndex: 1
2025
+ },
2026
+ className: styles$3['start-point']
2027
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
2028
+ style: {
2029
+ position: 'absolute',
2030
+ top: '13px',
2031
+ right: '0px',
2032
+ width: '100%',
2033
+ height: '4px',
2034
+ borderRadius: '2px',
2035
+ backgroundColor: '#EEEEEE',
2036
+ borderRadius: '10px',
2037
+ zIndex: -2
2038
+ }
2039
+ }), /*#__PURE__*/React__default["default"].createElement("input", {
2040
+ min: 0,
2041
+ step: 5,
2042
+ max: 100,
1928
2043
  type: "range",
1929
- className: styles$3.slider,
1930
- onClick: right ? onclick : null,
1931
- onInput: sliderInput,
1932
- onMouseUp: sliderChange
2044
+ value: rangeProgress,
2045
+ style: {
2046
+ height: '4px',
2047
+ width: '100%',
2048
+ borderRadius: '2px',
2049
+ cursor: 'pointer',
2050
+ backgroundColor: 'transparent'
2051
+ },
2052
+ className: `
2053
+ ${styles$3['range']}
2054
+ ${+rangeProgress === rangeNumber ? styles$3['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$3['range-error'] : styles$3['range-default']}
2055
+ `,
2056
+ onInput: handleRange
1933
2057
  }), /*#__PURE__*/React__default["default"].createElement("div", {
1934
- className: styles$3.selector
1935
- }, /*#__PURE__*/React__default["default"].createElement("div", {
1936
- className: styles$3.selectBtn
2058
+ style: {
2059
+ position: 'absolute',
2060
+ top: '13px',
2061
+ left: '0px',
2062
+ width: rangeProgress + '%',
2063
+ height: '4px',
2064
+ borderRadius: '2px',
2065
+ backgroundColor: +rangeProgress === rangeNumber ? '#0DA574' : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? '#EE0000' : 'transparent',
2066
+ borderRadius: '2px',
2067
+ zIndex: -1
2068
+ }
1937
2069
  })), /*#__PURE__*/React__default["default"].createElement("div", {
1938
- className: styles$3.progressBar
1939
- }), /*#__PURE__*/React__default["default"].createElement("div", {
1940
- className: styles$3.range
1941
- }, /*#__PURE__*/React__default["default"].createElement("i", {
1942
- className: "icon-vector-up"
1943
- }))));
2070
+ style: {
2071
+ position: 'absolute',
2072
+ bottom: '0px',
2073
+ height: '15px',
2074
+ left: `calc(${rangeNumber}% - 6px)`,
2075
+ transform: 'translate(-50% -50%)'
2076
+ }
2077
+ }, /*#__PURE__*/React__default["default"].createElement(SvgCaptchaArrowUp, null))));
1944
2078
  };
1945
2079
  Captcha.propTypes = {
1946
- onclick: PropTypes__default["default"].func,
1947
- className: PropTypes__default["default"].string,
1948
- rangeCount: PropTypes__default["default"].number
1949
- };
1950
- Captcha.defaultProps = {
1951
- onclick: undefined
2080
+ label: PropTypes__default["default"].string,
2081
+ range: PropTypes__default["default"].number.isRequired,
2082
+ getRange: PropTypes__default["default"].func.isRequired
1952
2083
  };
1953
2084
 
1954
2085
  var css_248z$3 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;cursor:pointer;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
@@ -1984,104 +2115,803 @@ Stepper.propTypes = {
1984
2115
  activeSteps: PropTypes__default["default"].number
1985
2116
  };
1986
2117
 
1987
- var css_248z$2 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}";
1988
- var styles$1 = {"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"};
1989
- styleInject(css_248z$2);
2118
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
2119
+ // require the crypto API and do not support built-in fallback to lower quality random number
2120
+ // generators (like Math.random()).
2121
+ var getRandomValues;
2122
+ var rnds8 = new Uint8Array(16);
2123
+ function rng() {
2124
+ // lazy load so that environments that need to polyfill have a chance to do so
2125
+ if (!getRandomValues) {
2126
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
2127
+ // find the complete implementation of crypto (msCrypto) on IE11.
2128
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
1990
2129
 
1991
- // import styles from "./pagination.module.scss";
2130
+ if (!getRandomValues) {
2131
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
2132
+ }
2133
+ }
1992
2134
 
1993
- const Dots$1 = "...";
1994
- const range = (start, end) => {
1995
- const length = end - start + 1;
1996
- return Array.from({
1997
- length
1998
- }, (_, idx) => idx + start);
1999
- };
2000
- const PaginationRange = ({
2001
- currentTotalCount,
2002
- offset,
2003
- siblingCountNumber,
2004
- currentPageNumber
2005
- }) => {
2006
- const paginationRange = React.useMemo(() => {
2007
- const totalPageCount = Math.ceil(currentTotalCount / offset);
2135
+ return getRandomValues(rnds8);
2136
+ }
2008
2137
 
2009
- //currentPage + 2*Dots + start + end = 5
2010
- const totalPageNumber = siblingCountNumber + 5;
2011
- if (totalPageNumber >= totalPageCount) {
2012
- return range(1, totalPageCount);
2013
- }
2014
- const rightSiblingIndex = Math.min(currentPageNumber + siblingCountNumber, totalPageCount);
2015
- const leftSiblingIndex = Math.max(currentPageNumber - siblingCountNumber, 1);
2016
- const shouldShowLeftDots = leftSiblingIndex > 2;
2017
- const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
2018
- const firstPageIndex = 1;
2019
- const lastPageIndex = totalPageCount;
2020
- if (!shouldShowLeftDots && shouldShowRightDots) {
2021
- let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
2022
- let leftRange = range(1, leftItemCount);
2023
- return [...leftRange, Dots$1, totalPageCount];
2024
- }
2025
- if (shouldShowLeftDots && !shouldShowRightDots) {
2026
- let rightItemCount = 0;
2027
- currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
2028
- let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
2029
- return [firstPageIndex, Dots$1, ...rightRange];
2030
- }
2031
- if (shouldShowLeftDots && shouldShowRightDots) {
2032
- let middleRange = range(leftSiblingIndex, rightSiblingIndex);
2033
- return [firstPageIndex, Dots$1, ...middleRange, Dots$1, lastPageIndex];
2138
+ var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
2139
+
2140
+ function validate(uuid) {
2141
+ return typeof uuid === 'string' && REGEX.test(uuid);
2142
+ }
2143
+
2144
+ /**
2145
+ * Convert array of 16 byte values to UUID string format of the form:
2146
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
2147
+ */
2148
+
2149
+ var byteToHex = [];
2150
+
2151
+ for (var i = 0; i < 256; ++i) {
2152
+ byteToHex.push((i + 0x100).toString(16).substr(1));
2153
+ }
2154
+
2155
+ function stringify(arr) {
2156
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2157
+ // Note: Be careful editing this code! It's been tuned for performance
2158
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
2159
+ var uuid = (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(); // Consistency check for valid UUID. If this throws, it's likely due to one
2160
+ // of the following:
2161
+ // - One or more input array values don't map to a hex octet (leading to
2162
+ // "undefined" in the uuid)
2163
+ // - Invalid input values for the RFC `version` or `variant` fields
2164
+
2165
+ if (!validate(uuid)) {
2166
+ throw TypeError('Stringified UUID is invalid');
2167
+ }
2168
+
2169
+ return uuid;
2170
+ }
2171
+
2172
+ function v4(options, buf, offset) {
2173
+ options = options || {};
2174
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
2175
+
2176
+ rnds[6] = rnds[6] & 0x0f | 0x40;
2177
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
2178
+
2179
+ if (buf) {
2180
+ offset = offset || 0;
2181
+
2182
+ for (var i = 0; i < 16; ++i) {
2183
+ buf[offset + i] = rnds[i];
2034
2184
  }
2035
- }, [currentTotalCount, offset, siblingCountNumber, currentPageNumber]);
2036
- return paginationRange;
2037
- };
2038
2185
 
2039
- const Dots = ({
2186
+ return buf;
2187
+ }
2188
+
2189
+ return stringify(rnds);
2190
+ }
2191
+
2192
+ const SvgUpload = ({
2040
2193
  title,
2041
2194
  titleId,
2042
2195
  ...props
2043
2196
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2044
- width: "1em",
2045
- height: "1em",
2046
- viewBox: "0 0 11 3",
2197
+ width: "51",
2198
+ height: "35",
2199
+ viewBox: "0 0 51 35",
2047
2200
  fill: "none",
2048
2201
  xmlns: "http://www.w3.org/2000/svg",
2049
2202
  "aria-labelledby": titleId
2050
2203
  }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2051
2204
  id: titleId
2052
2205
  }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
2053
- d: "M0.230125 1.13624C0.230125 0.741577 0.326125 0.464244 0.518125 0.304244C0.710125 0.144244 0.939458 0.064244 1.20613 0.064244C1.48346 0.064244 1.71813 0.144244 1.91013 0.304244C2.11279 0.464244 2.21413 0.741577 2.21413 1.13624C2.21413 1.52024 2.11279 1.79758 1.91013 1.96824C1.71813 2.13891 1.48346 2.22424 1.20613 2.22424C0.939458 2.22424 0.710125 2.13891 0.518125 1.96824C0.326125 1.79758 0.230125 1.52024 0.230125 1.13624ZM4.51138 1.13624C4.51138 0.741577 4.60738 0.464244 4.79938 0.304244C4.99138 0.144244 5.22071 0.064244 5.48738 0.064244C5.76471 0.064244 5.99938 0.144244 6.19138 0.304244C6.39404 0.464244 6.49538 0.741577 6.49538 1.13624C6.49538 1.52024 6.39404 1.79758 6.19138 1.96824C5.99938 2.13891 5.76471 2.22424 5.48738 2.22424C5.22071 2.22424 4.99138 2.13891 4.79938 1.96824C4.60738 1.79758 4.51138 1.52024 4.51138 1.13624ZM8.79263 1.13624C8.79263 0.741577 8.88863 0.464244 9.08063 0.304244C9.27263 0.144244 9.50196 0.064244 9.76863 0.064244C10.046 0.064244 10.2806 0.144244 10.4726 0.304244C10.6753 0.464244 10.7766 0.741577 10.7766 1.13624C10.7766 1.52024 10.6753 1.79758 10.4726 1.96824C10.2806 2.13891 10.046 2.22424 9.76863 2.22424C9.50196 2.22424 9.27263 2.13891 9.08063 1.96824C8.88863 1.79758 8.79263 1.52024 8.79263 1.13624Z",
2054
- fill: "#3C393E"
2206
+ d: "M41.54 11.842h-.017c-.23-3.225-2.902-5.772-6.167-5.772-1.08 0-2.095.28-2.979.77C30.267 2.774 26.041 0 21.167 0 14.318 0 8.742 5.483 8.534 12.326 3.758 12.708 0 16.726 0 21.63c0 5.155 4.153 9.334 9.277 9.334h22.625a10.987 10.987 0 0 1-.888-4.334c0-6.059 4.899-10.987 10.918-10.987 3.773 0 7.106 1.938 9.068 4.875-.444-4.864-4.508-8.675-9.46-8.675ZM15.654 6.975c-.072.06-.144.12-.211.185-.266.259-.512.53-.705.849-.741 1.218-.882 2.523-.72 3.927.156 1.35-1.942 1.334-2.095 0-.289-2.493.504-5.307 2.664-6.775 1.12-.763 2.164 1.052 1.067 1.814Zm-.022.015c-.047.035-.111.093 0 0Z",
2207
+ fill: "#D1D1D1"
2208
+ }), /*#__PURE__*/React__namespace.createElement("path", {
2209
+ fillRule: "evenodd",
2210
+ clipRule: "evenodd",
2211
+ d: "M41.822 17.245c-4.864 0-8.822 3.982-8.822 8.878C33 31.018 36.958 35 41.822 35c4.864 0 8.822-3.982 8.822-8.877 0-4.896-3.959-8.878-8.822-8.878Zm-.536 13.005v-6.689l-3.067 3.22a.69.69 0 0 1-1.01 0 .777.777 0 0 1 0-1.06l4.286-4.5A.71.71 0 0 1 42 21a.684.684 0 0 1 .505.22l4.286 4.5a.777.777 0 0 1 0 1.06.69.69 0 0 1-1.01 0l-3.067-3.22v6.69c0 .414-.32.75-.714.75-.395 0-.714-.336-.714-.75Z",
2212
+ fill: "#0DA574"
2055
2213
  }));
2056
2214
 
2057
- const SvgNextArrow = ({
2215
+ const SvgRemoveFile = ({
2058
2216
  title,
2059
2217
  titleId,
2060
2218
  ...props
2061
2219
  }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2062
- width: "1em",
2063
- height: "1em",
2064
- viewBox: "0 0 6 12",
2220
+ width: "26",
2221
+ height: "26",
2222
+ viewBox: "0 0 26 26",
2223
+ fill: "none",
2224
+ xmlns: "http://www.w3.org/2000/svg",
2225
+ "aria-labelledby": titleId
2226
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2227
+ id: titleId
2228
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("rect", {
2229
+ width: 26,
2230
+ height: 26,
2231
+ rx: 6,
2232
+ fill: "#FBFBFB"
2233
+ }), /*#__PURE__*/React__namespace.createElement("path", {
2234
+ d: "M13 4c.822 0 1.611.296 2.206.826s.95 1.255.99 2.024l.005.15h4c.204 0 .4.073.548.205.148.13.238.31.25.501a.72.72 0 0 1-.185.525.817.817 0 0 1-.52.264l-.093.005h-.68l-.943 10.915a2.75 2.75 0 0 1-.957 1.84 3.114 3.114 0 0 1-2.034.745h-5.173c-.754 0-1.48-.266-2.034-.745a2.75 2.75 0 0 1-.957-1.84L6.478 8.5H5.8a.831.831 0 0 1-.531-.19.736.736 0 0 1-.263-.472L5 7.75c0-.184.072-.361.202-.498a.818.818 0 0 1 .504-.247L5.8 7h4c0-.796.337-1.559.938-2.121A3.312 3.312 0 0 1 13 4Zm-1.8 6.938a.623.623 0 0 0-.394.138.553.553 0 0 0-.2.348l-.006.076v6l.006.076c.02.135.09.258.2.348.11.09.25.138.394.138.145 0 .285-.049.395-.138.109-.09.18-.213.2-.348l.005-.076v-6l-.005-.076a.553.553 0 0 0-.2-.348.624.624 0 0 0-.395-.139Zm3.6 0a.623.623 0 0 0-.394.138.553.553 0 0 0-.2.348l-.005.076v6l.005.076c.02.135.091.258.2.348.11.09.25.138.394.138.145 0 .286-.049.395-.138.11-.09.18-.213.2-.348l.006-.076v-6l-.006-.076a.553.553 0 0 0-.2-.348.624.624 0 0 0-.395-.139ZM13 5.5a1.66 1.66 0 0 0-1.088.4c-.296.257-.477.61-.508.987L11.4 7h3.2l-.003-.112a1.465 1.465 0 0 0-.508-.988A1.66 1.66 0 0 0 13 5.5Z",
2235
+ fill: "#00236A"
2236
+ }));
2237
+
2238
+ const SvgListItemPdf = ({
2239
+ title,
2240
+ titleId,
2241
+ ...props
2242
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2243
+ width: "32",
2244
+ height: "42",
2245
+ viewBox: "0 0 32 42",
2065
2246
  fill: "none",
2066
2247
  xmlns: "http://www.w3.org/2000/svg",
2067
2248
  "aria-labelledby": titleId
2068
2249
  }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2069
2250
  id: titleId
2070
2251
  }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
2071
- d: "M0.851445 11.9985C0.652853 11.9988 0.460393 11.9292 0.307477 11.8017C0.221413 11.7299 0.150271 11.6418 0.0981246 11.5423C0.0459785 11.4428 0.0138536 11.3339 0.0035897 11.2219C-0.00667418 11.1098 0.00512483 10.9969 0.0383107 10.8895C0.0714965 10.7821 0.125416 10.6823 0.196984 10.5958L4.00476 6.01173L0.332976 1.41906C0.262375 1.33158 0.209651 1.23092 0.177836 1.12286C0.146021 1.01481 0.135741 0.901501 0.147589 0.789439C0.159437 0.677378 0.193177 0.568777 0.246871 0.469879C0.300566 0.370982 0.373156 0.283737 0.460468 0.213159C0.548409 0.135301 0.651394 0.0765731 0.76296 0.0406621C0.874526 0.00475112 0.992266 -0.00756759 1.10879 0.00447845C1.22531 0.0165245 1.3381 0.0526755 1.44008 0.110663C1.54206 0.16865 1.63102 0.247221 1.70139 0.341446L5.80665 5.47292C5.93166 5.62596 6 5.81791 6 6.01601C6 6.2141 5.93166 6.40606 5.80665 6.55909L1.5569 11.6906C1.47164 11.7941 1.36333 11.8759 1.24075 11.9294C1.11818 11.9829 0.984807 12.0065 0.851445 11.9985Z",
2072
- fill: "#3C393E"
2252
+ fillRule: "evenodd",
2253
+ clipRule: "evenodd",
2254
+ d: "M31.862 10.64c.007.01.015.02.022.027l.116.108v28.328c0 .768-.306 1.505-.852 2.049a2.917 2.917 0 0 1-2.057.848H2.909a2.917 2.917 0 0 1-2.057-.848A2.891 2.891 0 0 1 0 39.103V2.897C0 2.128.306 1.392.852.848A2.917 2.917 0 0 1 2.909 0h18.27l.108.116.03.025.028.026.025.02.026.023L31.79 10.558c.02.018.037.037.052.058l.02.025Zm-1.743 29.486a1.45 1.45 0 0 0 .427-1.022v-8.77H13.95a.716.716 0 0 1-.546-.246l-1.963-2.238H1.455v11.254c.001.383.155.751.427 1.022.273.272.642.425 1.027.426h26.182a1.463 1.463 0 0 0 1.027-.426ZM4.364 17.633c0 .4.324.724.724.724h21.825a.724.724 0 1 0 0-1.448H5.088c-.4 0-.724.324-.724.724Zm23.273 3.186c0-.4-.325-.724-.724-.724H15.48a.724.724 0 0 0 0 1.448h11.432c.4 0 .724-.324.724-.724Zm-.724-5.641a.724.724 0 1 0 0-1.449H5.088a.724.724 0 1 0 0 1.449h21.825Zm-22.55-3.91c0 .4.325.723.725.723H16.52a.724.724 0 0 0 0-1.448H5.088c-.4 0-.724.324-.724.724Zm17.672-1.345c.272.27.642.423 1.027.425h6.458l-7.913-7.879V8.9c.002.384.155.752.428 1.024ZM10.43 36.013H9.103v2.385H8V32h2.43c.495 0 .916.088 1.261.264.349.172.614.413.796.72.181.305.272.654.272 1.046 0 .413-.09.768-.272 1.064a1.754 1.754 0 0 1-.796.68c-.345.16-.766.238-1.26.238Zm-1.327-3.134v2.259h1.327c.29 0 .525-.047.703-.14a.877.877 0 0 0 .391-.388c.085-.167.128-.357.128-.57 0-.203-.043-.392-.128-.568a.971.971 0 0 0-.39-.43c-.18-.109-.414-.163-.704-.163H9.103Zm6.504 5.52h-1.859V32H15.646c.425 0 .813.072 1.165.215.352.141.655.345.91.611.258.267.455.586.593.958.138.372.206.788.206 1.248v.339c0 .46-.068.876-.206 1.248a2.714 2.714 0 0 1-.593.958 2.662 2.662 0 0 1-.923.61c-.355.141-.752.211-1.191.211Zm0-.875h-.756v-4.645h.795c.285 0 .535.047.752.14.22.094.404.232.554.414a1.8 1.8 0 0 1 .342.672c.08.267.12.573.12.918v.348c0 .445-.07.829-.208 1.151-.134.322-.336.57-.606.743-.267.172-.598.259-.993.259Zm5.124-2.725v-1.92h2.975V32h-4.078v6.398h1.103v-2.724h2.61v-.875h-2.61Z",
2255
+ fill: "#051942"
2073
2256
  }));
2074
2257
 
2075
- const Pagination = ({
2076
- onChange,
2077
- totalCount,
2078
- siblingCount,
2079
- currentPage,
2080
- offset,
2081
- className
2082
- }) => {
2083
- const [siblingCountNumber, setSibilingCountNumber] = React.useState(siblingCount);
2084
- const [currentPageNumber, setCurrentPage] = React.useState(currentPage);
2258
+ const SvgListItemJpg = ({
2259
+ title,
2260
+ titleId,
2261
+ ...props
2262
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2263
+ width: "32",
2264
+ height: "42",
2265
+ viewBox: "0 0 32 42",
2266
+ fill: "none",
2267
+ xmlns: "http://www.w3.org/2000/svg",
2268
+ "aria-labelledby": titleId
2269
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2270
+ id: titleId
2271
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
2272
+ fillRule: "evenodd",
2273
+ clipRule: "evenodd",
2274
+ d: "M31.862 10.64c.007.01.015.02.022.027l.116.108v28.328c0 .768-.306 1.505-.852 2.049a2.917 2.917 0 0 1-2.057.848H2.909a2.917 2.917 0 0 1-2.057-.848A2.891 2.891 0 0 1 0 39.103V2.897C0 2.128.306 1.392.852.848A2.917 2.917 0 0 1 2.909 0h18.27l.108.116.03.025.028.026.025.02.026.023L31.79 10.558c.02.018.037.037.052.058l.02.025Zm-1.743 29.486a1.45 1.45 0 0 0 .427-1.022v-8.77H13.95a.716.716 0 0 1-.546-.246l-1.963-2.238H1.455v11.254c.001.383.155.751.427 1.022.273.272.642.425 1.027.426h26.182a1.463 1.463 0 0 0 1.027-.426ZM4.364 17.633c0 .4.324.724.724.724h21.825a.724.724 0 1 0 0-1.448H5.088c-.4 0-.724.324-.724.724Zm23.273 3.186c0-.4-.325-.724-.724-.724H15.48a.724.724 0 0 0 0 1.448h11.432c.4 0 .724-.324.724-.724Zm-.724-5.641a.724.724 0 1 0 0-1.449H5.088a.724.724 0 1 0 0 1.449h21.825Zm-22.55-3.91c0 .4.325.723.725.723H16.52a.724.724 0 0 0 0-1.448H5.088c-.4 0-.724.324-.724.724Zm17.672-1.345c.272.27.642.423 1.027.425h6.458l-7.913-7.879V8.9c.002.384.155.752.428 1.024Zm2.071 27.737v-2.443h-2.43v.822h1.331v1.27a1.19 1.19 0 0 1-.224.175c-.094.059-.221.11-.382.154a2.579 2.579 0 0 1-.62.062c-.258 0-.489-.047-.694-.14a1.408 1.408 0 0 1-.523-.427 2.062 2.062 0 0 1-.325-.69 3.614 3.614 0 0 1-.11-.936v-.453c0-.346.032-.653.097-.923.064-.27.16-.498.285-.685.13-.188.29-.33.484-.426.193-.097.417-.146.672-.146.296 0 .536.052.72.154.188.1.332.238.431.413.103.176.172.375.207.598h1.081a2.633 2.633 0 0 0-.356-1.055 1.913 1.913 0 0 0-.8-.72c-.343-.176-.776-.264-1.3-.264-.41 0-.778.069-1.104.206a2.204 2.204 0 0 0-.826.598 2.742 2.742 0 0 0-.527.967c-.12.378-.18.809-.18 1.292v.444c0 .486.066.92.197 1.3.132.378.318.7.559.963.243.264.531.464.865.602.334.135.702.202 1.103.202.472 0 .866-.051 1.182-.154.317-.102.57-.224.76-.364a2.13 2.13 0 0 0 .427-.396Zm-13.03-1.094v-4.478h1.099v4.478c0 .425-.091.786-.273 1.085-.181.3-.429.528-.742.686-.314.158-.67.237-1.068.237-.407 0-.77-.069-1.086-.206a1.622 1.622 0 0 1-.738-.633C8.09 37.45 8 37.09 8 36.654h1.107c0 .252.04.455.12.61a.755.755 0 0 0 .342.335c.15.067.324.1.523.1a.99.99 0 0 0 .505-.127.909.909 0 0 0 .352-.382c.085-.17.127-.378.127-.624Zm4.799-.466h-1.327v2.386h-1.103v-6.398h2.43c.495 0 .916.088 1.261.264.349.172.614.413.796.72.181.305.272.654.272 1.046 0 .413-.09.768-.272 1.064a1.753 1.753 0 0 1-.796.68c-.345.159-.766.238-1.261.238Zm-1.327-3.133v2.259h1.327c.29 0 .524-.047.703-.141a.876.876 0 0 0 .391-.387c.085-.167.128-.357.128-.571 0-.202-.043-.391-.128-.567a.97.97 0 0 0-.39-.43c-.18-.109-.414-.163-.704-.163h-1.327Z",
2275
+ fill: "#051942"
2276
+ }));
2277
+
2278
+ const SvgListItemDelete = ({
2279
+ title,
2280
+ titleId,
2281
+ ...props
2282
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2283
+ width: "22",
2284
+ height: "22",
2285
+ viewBox: "0 0 22 22",
2286
+ fill: "none",
2287
+ xmlns: "http://www.w3.org/2000/svg",
2288
+ "aria-labelledby": titleId
2289
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2290
+ id: titleId
2291
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
2292
+ d: "M7.071 3.144V.786A.786.786 0 0 1 7.857 0h6.286a.786.786 0 0 1 .786.786v2.358h6.285a.786.786 0 0 1 0 1.572H.786a.786.786 0 1 1 0-1.572H7.07Zm1.572 0h4.714V1.573H8.643v1.571ZM3.143 22a.786.786 0 0 1-.786-.786V4.716h17.286v16.498a.786.786 0 0 1-.786.786H3.143Zm5.5-4.714a.786.786 0 0 0 .786-.786V8.644a.786.786 0 0 0-1.572 0V16.5a.785.785 0 0 0 .786.786Zm4.714 0a.785.785 0 0 0 .786-.786V8.644a.785.785 0 0 0-1.572 0V16.5a.785.785 0 0 0 .786.786Z",
2293
+ fill: "#051942"
2294
+ }));
2295
+
2296
+ const SvgDeleteComponent = ({
2297
+ title,
2298
+ titleId,
2299
+ ...props
2300
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2301
+ width: "26",
2302
+ height: "26",
2303
+ viewBox: "0 0 26 26",
2304
+ fill: "none",
2305
+ xmlns: "http://www.w3.org/2000/svg",
2306
+ "aria-labelledby": titleId
2307
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2308
+ id: titleId
2309
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("rect", {
2310
+ x: 0.5,
2311
+ y: 0.5,
2312
+ width: 25,
2313
+ height: 25,
2314
+ rx: 5.5,
2315
+ stroke: "#D1D1D1"
2316
+ }), /*#__PURE__*/React__namespace.createElement("path", {
2317
+ d: "M13 4c.822 0 1.611.296 2.206.826s.95 1.255.99 2.024l.005.15h4c.204 0 .4.073.548.205.148.13.238.31.25.501a.72.72 0 0 1-.185.525.817.817 0 0 1-.52.264l-.093.005h-.68l-.943 10.915a2.75 2.75 0 0 1-.957 1.84 3.114 3.114 0 0 1-2.034.745h-5.173c-.754 0-1.48-.266-2.034-.745a2.75 2.75 0 0 1-.957-1.84L6.478 8.5H5.8a.831.831 0 0 1-.531-.19.736.736 0 0 1-.263-.472L5 7.75c0-.184.072-.361.202-.498a.818.818 0 0 1 .504-.247L5.8 7h4c0-.796.337-1.559.938-2.121A3.312 3.312 0 0 1 13 4Zm-1.8 6.938a.623.623 0 0 0-.394.138.553.553 0 0 0-.2.348l-.006.076v6l.006.076c.02.135.09.258.2.348.11.09.25.138.394.138.145 0 .285-.049.395-.138.109-.09.18-.213.2-.348l.005-.076v-6l-.005-.076a.553.553 0 0 0-.2-.348.624.624 0 0 0-.395-.139Zm3.6 0a.623.623 0 0 0-.394.138.553.553 0 0 0-.2.348l-.005.076v6l.005.076c.02.135.091.258.2.348.11.09.25.138.394.138.145 0 .286-.049.395-.138.11-.09.18-.213.2-.348l.006-.076v-6l-.006-.076a.553.553 0 0 0-.2-.348.624.624 0 0 0-.395-.139ZM13 5.5a1.66 1.66 0 0 0-1.088.4c-.296.257-.477.61-.508.987L11.4 7h3.2l-.003-.112a1.465 1.465 0 0 0-.508-.988A1.66 1.66 0 0 0 13 5.5Z",
2318
+ fill: "#E00"
2319
+ }));
2320
+
2321
+ const NewFile = ({
2322
+ size,
2323
+ name,
2324
+ color,
2325
+ label,
2326
+ width,
2327
+ weight,
2328
+ height,
2329
+ radius,
2330
+ change,
2331
+ border,
2332
+ maxSize,
2333
+ disabled,
2334
+ multiple,
2335
+ required,
2336
+ errorSize,
2337
+ labelSize,
2338
+ labelColor,
2339
+ errorColor,
2340
+ filesArray,
2341
+ borderColor,
2342
+ uploadColor,
2343
+ defaultData,
2344
+ errorMessage,
2345
+ fileExtensions,
2346
+ backgroundColor,
2347
+ deleteComponent,
2348
+ borderHoverColor,
2349
+ progressTrackColor,
2350
+ labelRequiredColor,
2351
+ hiddenBackgroundColor,
2352
+ extentionsRowMarginTop,
2353
+ listItemBackgroundColor
2354
+ }) => {
2355
+ const ref = React.useRef(null);
2356
+ const inpRef = React.useRef(null);
2357
+ const [error, setError] = React.useState('');
2358
+ const [image, setImage] = React.useState('');
2359
+ const [progress, setProgress] = React.useState(5);
2360
+ const [isHover, setIsHover] = React.useState(false);
2361
+ const [multipleFiles, setMultipleFiles] = React.useState([]);
2362
+ const configStyles = compereConfigs();
2363
+ const handleRemoveComponent = () => {
2364
+ const node = ReactDOM__default["default"].findDOMNode(ref.current);
2365
+ const parent = node.parentNode;
2366
+ parent.removeChild(node);
2367
+ };
2368
+ const handleRemoveFile = () => {
2369
+ if (!multiple) {
2370
+ setImage('');
2371
+ onChange(null);
2372
+ }
2373
+ };
2374
+ const handleChange = e => {
2375
+ const file = e.target.files;
2376
+ if (file[0]) {
2377
+ if (file[0].size <= maxSize * Math.pow(2, 20)) {
2378
+ if (fileExtensions.includes(file[0].type.split('/')[1])) {
2379
+ setError('');
2380
+ if (multiple) {
2381
+ change({
2382
+ uuid: v4(),
2383
+ file: file[0]
2384
+ });
2385
+ } else {
2386
+ change({
2387
+ file
2388
+ });
2389
+ if (file[0].type === 'application/pdf') {
2390
+ setImage('pdf');
2391
+ } else {
2392
+ setImage(URL.createObjectURL(file[0]));
2393
+ }
2394
+ }
2395
+ } else {
2396
+ setImage('');
2397
+ setError('ֆայլի սխալ ֆորմատ');
2398
+ }
2399
+ } else {
2400
+ setImage('');
2401
+ setError('առավելագույն ծավալ');
2402
+ }
2403
+ } else {
2404
+ // TODO:
2405
+ if (!multiple || multiple && filesArray && filesArray.length === 0) {
2406
+ setImage('');
2407
+ setError('Ֆայլը ընտրված չէ');
2408
+ }
2409
+ }
2410
+ };
2411
+ const handleClick = () => {
2412
+ if (!image) {
2413
+ inpRef.current.click();
2414
+ }
2415
+ };
2416
+ const handleMouseEnter = () => {
2417
+ setIsHover(true);
2418
+ };
2419
+ const handleMouseLeave = () => {
2420
+ setIsHover(false);
2421
+ };
2422
+ const handleStopPropagation = e => {
2423
+ e.stopPropagation();
2424
+ };
2425
+ React.useEffect(() => {
2426
+ if (!multiple && defaultData) {
2427
+ if (defaultData.type && defaultData.type !== 'application/pdf') {
2428
+ setImage(defaultData.url);
2429
+ } else {
2430
+ setImage('pdf');
2431
+ }
2432
+ }
2433
+ if (multiple && !filesArray) {
2434
+ alert('In multiple mode, you should add filesArray prop for drawing files');
2435
+ }
2436
+ if (filesArray) {
2437
+ setMultipleFiles(filesArray);
2438
+ }
2439
+ }, [multiple, filesArray && filesArray.length, defaultData]);
2440
+ React.useEffect(() => {
2441
+ if (errorMessage) {
2442
+ setError(errorMessage);
2443
+ } else {
2444
+ setError('');
2445
+ }
2446
+ }, [errorMessage]);
2447
+ React.useEffect(() => {
2448
+ if (!change) {
2449
+ alert('Please add change prop on File component');
2450
+ }
2451
+ }, [change]);
2452
+ console.log(multipleFiles, 'multipleFiles');
2453
+ return /*#__PURE__*/React__default["default"].createElement("div", {
2454
+ ref: ref,
2455
+ style: {
2456
+ width: width ? width : configStyles.File.width
2457
+ }
2458
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
2459
+ style: {
2460
+ display: 'flex',
2461
+ marginBottom: '6px',
2462
+ alignItems: 'center',
2463
+ justifyContent: label ? 'space-between' : 'flex-end'
2464
+ }
2465
+ }, label && /*#__PURE__*/React__default["default"].createElement("label", {
2466
+ style: {
2467
+ color: labelColor ? labelColor : configStyles.File.labelColor,
2468
+ fontSize: labelSize ? labelSize : configStyles.File.labelSize
2469
+ }
2470
+ }, label, required && /*#__PURE__*/React__default["default"].createElement("sup", {
2471
+ style: {
2472
+ color: labelRequiredColor ? labelRequiredColor : configStyles.File.labelRequiredColor
2473
+ }
2474
+ }, "*")), deleteComponent && /*#__PURE__*/React__default["default"].createElement("span", {
2475
+ style: {
2476
+ cursor: 'pointer'
2477
+ },
2478
+ onClick: handleRemoveComponent
2479
+ }, /*#__PURE__*/React__default["default"].createElement(SvgDeleteComponent, null))), /*#__PURE__*/React__default["default"].createElement("div", {
2480
+ style: {
2481
+ width: '100%',
2482
+ display: 'flex',
2483
+ alignItems: 'center',
2484
+ position: 'relative',
2485
+ boxSizing: 'border-box',
2486
+ justifyContent: 'center',
2487
+ cursor: !disabled ? 'pointer' : 'not-allowed',
2488
+ height: height ? height : configStyles.File.height,
2489
+ border: border ? border : configStyles.File.border,
2490
+ borderRadius: radius ? radius : configStyles.File.radius,
2491
+ backgroundColor: backgroundColor ? backgroundColor : configStyles.File.backgroundColor,
2492
+ borderColor: error ? errorColor ? errorColor : configStyles.File.errorColor : disabled ? borderColor ? borderColor : configStyles.File.borderColor : isHover ? borderHoverColor ? borderHoverColor : configStyles.File.borderHoverColor : borderColor ? borderColor : configStyles.File.borderColor
2493
+ },
2494
+ onClick: handleClick,
2495
+ onMouseEnter: handleMouseEnter,
2496
+ onMouseLeave: handleMouseLeave
2497
+ }, /*#__PURE__*/React__default["default"].createElement("input", {
2498
+ hidden: true,
2499
+ name: name,
2500
+ type: "file",
2501
+ ref: inpRef,
2502
+ disabled: disabled,
2503
+ onChange: handleChange
2504
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
2505
+ style: {
2506
+ width: '100%',
2507
+ height: '100%',
2508
+ display: 'flex',
2509
+ textAlign: 'center',
2510
+ alignItems: 'center',
2511
+ flexDirection: 'column',
2512
+ justifyContent: 'center',
2513
+ color: color ? color : configStyles.File.color,
2514
+ fontSize: size ? size : configStyles.File.size,
2515
+ fontWeight: weight ? weight : configStyles.File.weight
2516
+ }
2517
+ }, !multiple && image ? image === 'pdf' ? /*#__PURE__*/React__default["default"].createElement(PDF, null) : /*#__PURE__*/React__default["default"].createElement("img", {
2518
+ src: image,
2519
+ style: {
2520
+ maxHeight: '100%'
2521
+ },
2522
+ alt: "file preview"
2523
+ }) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(SvgUpload, null)), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("p", {
2524
+ style: {
2525
+ margin: '0px'
2526
+ }
2527
+ }, "\u054F\u0565\u0572\u0561\u0564\u0580\u0565\u056C \u0586\u0561\u0575\u056C\u0568 \u0561\u0575\u057D\u057F\u0565\u0572", /*#__PURE__*/React__default["default"].createElement("br", null), "\u056F\u0561\u0574 ", /*#__PURE__*/React__default["default"].createElement("span", {
2528
+ style: {
2529
+ color: uploadColor ? uploadColor : configStyles.File.uploadColor
2530
+ }
2531
+ }, "\u0532\u0565\u057C\u0576\u0565\u056C"))), /*#__PURE__*/React__default["default"].createElement("div", {
2532
+ style: {
2533
+ marginTop: extentionsRowMarginTop ? extentionsRowMarginTop : configStyles.File.extentionsRowMarginTop
2534
+ }
2535
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
2536
+ style: {
2537
+ margin: '0px'
2538
+ }
2539
+ }, "\u0531\u057C\u0561\u057E\u0565\u056C\u0561\u0563\u0578\u0582\u0575\u0576\u0568 ", maxSize, "\u0544\u0532 ( ", fileExtensions.toString().split(',').join(', '), " )")))), /*#__PURE__*/React__default["default"].createElement("div", {
2540
+ style: {
2541
+ position: 'absolute',
2542
+ top: '0px',
2543
+ left: '0px',
2544
+ zIndex: '1',
2545
+ width: '100%',
2546
+ height: '100%',
2547
+ padding: '10px',
2548
+ cursor: 'default',
2549
+ boxSizing: 'border-box',
2550
+ alignItems: 'flex-start',
2551
+ justifyContent: 'flex-end',
2552
+ borderRadius: radius ? radius : configStyles.File.radius,
2553
+ display: !multiple && !disabled && image && !error && isHover ? 'flex' : 'none',
2554
+ backgroundColor: hiddenBackgroundColor ? hiddenBackgroundColor : configStyles.File.hiddenBackgroundColor
2555
+ },
2556
+ onClick: handleStopPropagation
2557
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
2558
+ style: {
2559
+ cursor: 'pointer'
2560
+ },
2561
+ onClick: handleRemoveFile
2562
+ }, /*#__PURE__*/React__default["default"].createElement(SvgRemoveFile, null)))), error ? /*#__PURE__*/React__default["default"].createElement("span", {
2563
+ style: {
2564
+ marginTop: '6px',
2565
+ display: 'inline-block',
2566
+ color: errorColor ? errorColor : configStyles.File.errorColor,
2567
+ fontSize: errorSize ? errorSize : configStyles.File.errorSize
2568
+ }
2569
+ }, error) : '', multiple && multipleFiles && multipleFiles.length > 0 && multipleFiles.map((item, index) => {
2570
+ return /*#__PURE__*/React__default["default"].createElement("div", {
2571
+ key: `${item.file.name}_${index}`,
2572
+ style: {
2573
+ display: 'flex',
2574
+ width: '100%',
2575
+ height: '70px',
2576
+ marginTop: '6px',
2577
+ alignItems: 'center',
2578
+ padding: '14px 20px',
2579
+ boxSizing: 'border-box',
2580
+ justifyContent: 'space-between',
2581
+ borderRadius: radius ? radius : configStyles.File.radius,
2582
+ backgroundColor: listItemBackgroundColor ? listItemBackgroundColor : configStyles.File.listItemBackgroundColor
2583
+ }
2584
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
2585
+ style: {
2586
+ width: '32px'
2587
+ }
2588
+ }, item.file.type.split('/')[1].toLowerCase() === 'pdf' ? /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : item.file.type.split('/')[1].toLowerCase() === 'jpeg' ? /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
2589
+ style: {
2590
+ position: 'relative',
2591
+ display: 'flex',
2592
+ height: '40px',
2593
+ margin: '0px 14px',
2594
+ alignItems: 'flex-end',
2595
+ width: 'calc(100% - 82px)'
2596
+ }
2597
+ }, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("p", {
2598
+ className: "new"
2599
+ }, item.file.name)), /*#__PURE__*/React__default["default"].createElement("div", {
2600
+ style: {
2601
+ position: 'absolute',
2602
+ left: '0px',
2603
+ bottom: '5px',
2604
+ width: '100%',
2605
+ height: '4px',
2606
+ borderRadius: '10px',
2607
+ backgroundColor: progressTrackColor ? progressTrackColor : configStyles.File.progressTrackColor
2608
+ }
2609
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
2610
+ style: {
2611
+ width: progress + '%',
2612
+ height: '100%',
2613
+ borderRadius: '10px',
2614
+ backgroundColor: 'green'
2615
+ }
2616
+ }))), /*#__PURE__*/React__default["default"].createElement("div", {
2617
+ style: {
2618
+ width: '22px',
2619
+ cursor: 'pointer'
2620
+ }
2621
+ }, /*#__PURE__*/React__default["default"].createElement(SvgListItemDelete, null)));
2622
+ }));
2623
+ };
2624
+ NewFile.propTypes = {
2625
+ size: PropTypes__default["default"].string,
2626
+ label: PropTypes__default["default"].string,
2627
+ width: PropTypes__default["default"].string,
2628
+ color: PropTypes__default["default"].string,
2629
+ height: PropTypes__default["default"].string,
2630
+ disabled: PropTypes__default["default"].bool,
2631
+ radius: PropTypes__default["default"].string,
2632
+ border: PropTypes__default["default"].string,
2633
+ required: PropTypes__default["default"].bool,
2634
+ weight: PropTypes__default["default"].number,
2635
+ maxSize: PropTypes__default["default"].number,
2636
+ errorSize: PropTypes__default["default"].string,
2637
+ labelSize: PropTypes__default["default"].string,
2638
+ labelColor: PropTypes__default["default"].string,
2639
+ errorColor: PropTypes__default["default"].string,
2640
+ borderColor: PropTypes__default["default"].string,
2641
+ uploadColor: PropTypes__default["default"].string,
2642
+ defaultData: PropTypes__default["default"].object,
2643
+ errorMessage: PropTypes__default["default"].string,
2644
+ deleteComponent: PropTypes__default["default"].bool,
2645
+ backgroundColor: PropTypes__default["default"].string,
2646
+ change: PropTypes__default["default"].func.isRequired,
2647
+ borderHoverColor: PropTypes__default["default"].string,
2648
+ labelRequiredColor: PropTypes__default["default"].string,
2649
+ progressTrackColor: PropTypes__default["default"].string,
2650
+ hiddenBackgroundColor: PropTypes__default["default"].string,
2651
+ extentionsRowMarginTop: PropTypes__default["default"].string,
2652
+ listItemBackgroundColor: PropTypes__default["default"].string,
2653
+ filesArray: PropTypes__default["default"].arrayOf(PropTypes__default["default"].object),
2654
+ fileExtensions: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string)
2655
+ };
2656
+ NewFile.defaultProps = {
2657
+ maxSize: 5,
2658
+ fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
2659
+ };
2660
+
2661
+ var css_248z$2 = "textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
2662
+ styleInject(css_248z$2);
2663
+
2664
+ const Textarea = ({
2665
+ size,
2666
+ label,
2667
+ width,
2668
+ value,
2669
+ height,
2670
+ resize,
2671
+ border,
2672
+ radius,
2673
+ padding,
2674
+ required,
2675
+ onChange,
2676
+ minWidth,
2677
+ maxWidth,
2678
+ minHeight,
2679
+ maxHeight,
2680
+ boxSizing,
2681
+ maxLength,
2682
+ labelSize,
2683
+ labelColor,
2684
+ borderColor,
2685
+ labelWeight,
2686
+ placeholder,
2687
+ labelDisplay,
2688
+ backgroundColor,
2689
+ borderFocusColor,
2690
+ borderHoverColor,
2691
+ showCharacterCount,
2692
+ labelRequiredColor
2693
+ }) => {
2694
+ const [isHover, setIsHover] = React.useState(false);
2695
+ const [isFocus, setIsFocus] = React.useState(false);
2696
+ const [innerValue, setInnerValue] = React.useState('');
2697
+ const configStyles = compereConfigs();
2698
+ const handleMouseEnter = () => {
2699
+ setIsHover(true);
2700
+ };
2701
+ const handleMouseLeave = () => {
2702
+ setIsHover(false);
2703
+ };
2704
+ const handleFocus = () => {
2705
+ setIsFocus(true);
2706
+ };
2707
+ const handleBlur = () => {
2708
+ setIsFocus(false);
2709
+ };
2710
+ const handleChange = e => {
2711
+ const value = e.target.value;
2712
+ onChange(value);
2713
+ if (maxLength) {
2714
+ if (value.length > maxLength) {
2715
+ onChange(value.substr(0, maxLength));
2716
+ }
2717
+ } else {
2718
+ if (value.length > configStyles.TEXTAREA.maxLength) {
2719
+ onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
2720
+ }
2721
+ }
2722
+ };
2723
+ React.useEffect(() => {
2724
+ if (value === undefined) {
2725
+ alert('Please add value prop on Textarea component');
2726
+ }
2727
+ if (!onChange) {
2728
+ alert('Please add onChange function on Textarea component');
2729
+ }
2730
+ setInnerValue(value);
2731
+ }, [value, onChange]);
2732
+ return /*#__PURE__*/React__default["default"].createElement("div", {
2733
+ style: {
2734
+ width: width ? width : configStyles.TEXTAREA.width
2735
+ }
2736
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
2737
+ style: {
2738
+ display: 'flex',
2739
+ alignItems: 'center',
2740
+ justifyContent: label ? 'space-between' : 'flex-end'
2741
+ }
2742
+ }, label ? /*#__PURE__*/React__default["default"].createElement("label", {
2743
+ style: {
2744
+ color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
2745
+ fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize,
2746
+ display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
2747
+ fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
2748
+ }
2749
+ }, label, required && /*#__PURE__*/React__default["default"].createElement("sup", {
2750
+ style: {
2751
+ color: labelRequiredColor ? labelRequiredColor : configStyles.TEXTAREA.labelRequiredColor
2752
+ }
2753
+ }, "*")) : '', showCharacterCount && maxLength && /*#__PURE__*/React__default["default"].createElement("span", {
2754
+ style: {
2755
+ color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
2756
+ fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize
2757
+ }
2758
+ }, maxLength - value.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default["default"].createElement("textarea", {
2759
+ style: {
2760
+ width: '100%',
2761
+ outline: 'none',
2762
+ overflow: 'auto',
2763
+ fontSize: size ? size : configStyles.TEXTAREA.size,
2764
+ height: height ? height : configStyles.TEXTAREA.height,
2765
+ border: border ? border : configStyles.TEXTAREA.border,
2766
+ padding: padding ? padding : configStyles.TEXTAREA.padding,
2767
+ borderRadius: radius ? radius : configStyles.TEXTAREA.radius,
2768
+ minWidth: minWidth ? minWidth : configStyles.TEXTAREA.minWidth,
2769
+ maxWidth: maxWidth ? maxWidth : configStyles.TEXTAREA.maxWidth,
2770
+ minHeight: minHeight ? minHeight : configStyles.TEXTAREA.minHeight,
2771
+ maxHeight: maxHeight ? maxHeight : configStyles.TEXTAREA.maxHeight,
2772
+ boxSizing: boxSizing ? boxSizing : configStyles.TEXTAREA.boxSizing,
2773
+ backgroundColor: backgroundColor ? backgroundColor : configStyles.TEXTAREA.backgroundColor,
2774
+ borderColor: isFocus ? borderFocusColor ? borderFocusColor : configStyles.TEXTAREA.borderFocusColor : isHover ? borderHoverColor ? borderHoverColor : configStyles.TEXTAREA.borderHoverColor : borderColor ? borderColor : configStyles.TEXTAREA.borderColor,
2775
+ resize: resize ? resize : configStyles.TEXTAREA.resize
2776
+ },
2777
+ value: innerValue,
2778
+ onBlur: handleBlur,
2779
+ onFocus: handleFocus,
2780
+ onChange: handleChange,
2781
+ placeholder: placeholder,
2782
+ onMouseEnter: handleMouseEnter,
2783
+ onMouseLeave: handleMouseLeave
2784
+ }));
2785
+ };
2786
+ Textarea.propTypes = {
2787
+ size: PropTypes__default["default"].string,
2788
+ label: PropTypes__default["default"].string,
2789
+ width: PropTypes__default["default"].string,
2790
+ height: PropTypes__default["default"].string,
2791
+ resize: PropTypes__default["default"].string,
2792
+ border: PropTypes__default["default"].string,
2793
+ radius: PropTypes__default["default"].string,
2794
+ required: PropTypes__default["default"].bool,
2795
+ padding: PropTypes__default["default"].string,
2796
+ minWidth: PropTypes__default["default"].string,
2797
+ maxWidth: PropTypes__default["default"].string,
2798
+ boxSizing: PropTypes__default["default"].string,
2799
+ minHeight: PropTypes__default["default"].string,
2800
+ maxHeight: PropTypes__default["default"].string,
2801
+ maxLength: PropTypes__default["default"].number,
2802
+ labelSize: PropTypes__default["default"].string,
2803
+ labelColor: PropTypes__default["default"].string,
2804
+ labelWeight: PropTypes__default["default"].string,
2805
+ borderColor: PropTypes__default["default"].string,
2806
+ placeholder: PropTypes__default["default"].string,
2807
+ labelDisplay: PropTypes__default["default"].string,
2808
+ backgroundColor: PropTypes__default["default"].string,
2809
+ showCharacterCount: PropTypes__default["default"].bool,
2810
+ value: PropTypes__default["default"].string.isRequired,
2811
+ borderFocusColor: PropTypes__default["default"].string,
2812
+ borderHoverColor: PropTypes__default["default"].string,
2813
+ onChange: PropTypes__default["default"].func.isRequired,
2814
+ labelRequiredColor: PropTypes__default["default"].string
2815
+ };
2816
+
2817
+ var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}";
2818
+ var styles$1 = {"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"};
2819
+ styleInject(css_248z$1);
2820
+
2821
+ // import styles from "./pagination.module.scss";
2822
+
2823
+ const Dots = "...";
2824
+ const range = (start, end) => {
2825
+ const length = end - start + 1;
2826
+ return Array.from({
2827
+ length
2828
+ }, (_, idx) => idx + start);
2829
+ };
2830
+ const PaginationRange = ({
2831
+ currentTotalCount,
2832
+ offset,
2833
+ siblingCountNumber,
2834
+ currentPageNumber
2835
+ }) => {
2836
+ const paginationRange = React.useMemo(() => {
2837
+ const totalPageCount = Math.ceil(currentTotalCount / offset);
2838
+
2839
+ //currentPage + 2*Dots + start + end = 5
2840
+ const totalPageNumber = siblingCountNumber + 5;
2841
+ if (totalPageNumber >= totalPageCount) {
2842
+ return range(1, totalPageCount);
2843
+ }
2844
+ const rightSiblingIndex = Math.min(currentPageNumber + siblingCountNumber, totalPageCount);
2845
+ const leftSiblingIndex = Math.max(currentPageNumber - siblingCountNumber, 1);
2846
+ const shouldShowLeftDots = leftSiblingIndex > 2;
2847
+ const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
2848
+ const firstPageIndex = 1;
2849
+ const lastPageIndex = totalPageCount;
2850
+ if (!shouldShowLeftDots && shouldShowRightDots) {
2851
+ let leftItemCount = currentPageNumber === 4 && lastPageIndex > 7 ? 4 + siblingCountNumber : 3 + siblingCountNumber;
2852
+ let leftRange = range(1, leftItemCount);
2853
+ return [...leftRange, Dots, totalPageCount];
2854
+ }
2855
+ if (shouldShowLeftDots && !shouldShowRightDots) {
2856
+ let rightItemCount = 0;
2857
+ currentPageNumber === lastPageIndex - 3 && lastPageIndex > 7 ? rightItemCount = 4 + siblingCountNumber : rightItemCount = 3 + siblingCountNumber;
2858
+ let rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
2859
+ return [firstPageIndex, Dots, ...rightRange];
2860
+ }
2861
+ if (shouldShowLeftDots && shouldShowRightDots) {
2862
+ let middleRange = range(leftSiblingIndex, rightSiblingIndex);
2863
+ return [firstPageIndex, Dots, ...middleRange, Dots, lastPageIndex];
2864
+ }
2865
+ }, [currentTotalCount, offset, siblingCountNumber, currentPageNumber]);
2866
+ return paginationRange;
2867
+ };
2868
+
2869
+ const SvgDots = ({
2870
+ title,
2871
+ titleId,
2872
+ ...props
2873
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2874
+ width: "11",
2875
+ height: "3",
2876
+ viewBox: "0 0 11 3",
2877
+ fill: "none",
2878
+ xmlns: "http://www.w3.org/2000/svg",
2879
+ "aria-labelledby": titleId
2880
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2881
+ id: titleId
2882
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
2883
+ d: "M.23 1.136C.23.742.326.464.518.304c.192-.16.421-.24.688-.24.277 0 .512.08.704.24.203.16.304.438.304.832 0 .384-.101.662-.304.832-.192.17-.427.256-.704.256a1 1 0 0 1-.688-.256C.326 1.798.23 1.52.23 1.136Zm4.281 0c0-.394.096-.672.288-.832.192-.16.422-.24.688-.24.278 0 .512.08.704.24.203.16.304.438.304.832 0 .384-.101.662-.304.832-.192.17-.426.256-.704.256a1 1 0 0 1-.688-.256c-.192-.17-.288-.448-.288-.832Zm4.282 0c0-.394.096-.672.288-.832.192-.16.421-.24.688-.24.277 0 .512.08.704.24.202.16.304.438.304.832 0 .384-.102.662-.304.832-.192.17-.427.256-.704.256a1 1 0 0 1-.688-.256c-.192-.17-.288-.448-.288-.832Z",
2884
+ fill: "#3C393E"
2885
+ }));
2886
+
2887
+ const SvgNextarrow = ({
2888
+ title,
2889
+ titleId,
2890
+ ...props
2891
+ }) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
2892
+ width: "6",
2893
+ height: "12",
2894
+ viewBox: "0 0 6 12",
2895
+ fill: "none",
2896
+ xmlns: "http://www.w3.org/2000/svg",
2897
+ "aria-labelledby": titleId
2898
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
2899
+ id: titleId
2900
+ }, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
2901
+ d: "M.851 11.998a.847.847 0 0 1-.847-.776.86.86 0 0 1 .193-.626l3.808-4.584L.333 1.419A.857.857 0 0 1 .46.213a.849.849 0 0 1 1.241.128l4.106 5.132a.859.859 0 0 1 0 1.086l-4.25 5.132a.85.85 0 0 1-.706.307Z",
2902
+ fill: "#3C393E"
2903
+ }));
2904
+
2905
+ const Pagination = ({
2906
+ onChange,
2907
+ totalCount,
2908
+ siblingCount,
2909
+ currentPage,
2910
+ offset,
2911
+ className
2912
+ }) => {
2913
+ const [siblingCountNumber, setSibilingCountNumber] = React.useState(siblingCount);
2914
+ const [currentPageNumber, setCurrentPage] = React.useState(currentPage);
2085
2915
  const [currentTotalCount, setcurrentTotalCount] = React.useState(totalCount);
2086
2916
  React.useEffect(() => {
2087
2917
  setcurrentTotalCount(totalCount);
@@ -2132,8 +2962,8 @@ const Pagination = ({
2132
2962
  className: `${styles$1["pagination-btn"]} pagination-btn-rem`,
2133
2963
  onClick: onPrevious,
2134
2964
  disabled: currentPage === 1 ? true : false
2135
- }, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null)), paginationRange.map((pageNumber, id) => {
2136
- if (pageNumber === Dots$1) {
2965
+ }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
2966
+ if (pageNumber === Dots) {
2137
2967
  let currentPageIndex = paginationRange.indexOf(currentPageNumber);
2138
2968
  return /*#__PURE__*/React__default["default"].createElement("li", {
2139
2969
  key: id,
@@ -2142,16 +2972,16 @@ const Pagination = ({
2142
2972
  disabled: currentPageIndex === 0 ? true : false
2143
2973
  }, id < currentPageIndex ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
2144
2974
  className: `${styles$1["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
2145
- }, /*#__PURE__*/React__default["default"].createElement(Dots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
2975
+ }, /*#__PURE__*/React__default["default"].createElement(SvgDots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
2146
2976
  className: `${styles$1["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`,
2147
2977
  style: {
2148
2978
  transform: 'rotate(180deg)'
2149
2979
  }
2150
- }, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
2980
+ }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
2151
2981
  className: `${styles$1["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
2152
- }, /*#__PURE__*/React__default["default"].createElement(Dots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
2982
+ }, /*#__PURE__*/React__default["default"].createElement(SvgDots, null)), /*#__PURE__*/React__default["default"].createElement("span", {
2153
2983
  className: `${styles$1["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
2154
- }, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null))));
2984
+ }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))));
2155
2985
  }
2156
2986
  return /*#__PURE__*/React__default["default"].createElement("li", {
2157
2987
  onClick: () => onPageChange(pageNumber),
@@ -2162,7 +2992,7 @@ const Pagination = ({
2162
2992
  onClick: onNext,
2163
2993
  className: `${styles$1["pagination-btn"]} pagination-btn-rem`,
2164
2994
  disabled: currentPageNumber === lastPage ? true : false
2165
- }, /*#__PURE__*/React__default["default"].createElement(SvgNextArrow, null)));
2995
+ }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null)));
2166
2996
  };
2167
2997
  Pagination.propTypes = {
2168
2998
  offset: PropTypes__default["default"].number,
@@ -2176,9 +3006,9 @@ Pagination.defaultProps = {
2176
3006
  siblingCount: 2
2177
3007
  };
2178
3008
 
2179
- 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}";
3009
+ var css_248z = ".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}";
2180
3010
  var styles = {"autocomplate-content":"autocomplate-module_autocomplate-content__UbIUT","autocomplate-content-top":"autocomplate-module_autocomplate-content-top__FVgCp","active":"autocomplate-module_active__40fdV","autocomplate-content-bottom":"autocomplate-module_autocomplate-content-bottom__yk0zP","select-show":"autocomplate-module_select-show__7Uap4","autocomplate-content-bottom-inner":"autocomplate-module_autocomplate-content-bottom-inner__rF5IF","autocomplate-content-bottom-row":"autocomplate-module_autocomplate-content-bottom-row__dRsZa","no-option":"autocomplate-module_no-option__xv0-E","option-active":"autocomplate-module_option-active__WuH4I","autocomplate-title":"autocomplate-module_autocomplate-title__3Qxqz","errorBorder":"autocomplate-module_errorBorder__LV-nb","errorMessage":"autocomplate-module_errorMessage__Gchpc"};
2181
- styleInject(css_248z$1);
3011
+ styleInject(css_248z);
2182
3012
 
2183
3013
  const Autocomplate = ({
2184
3014
  label,
@@ -2312,128 +3142,327 @@ Autocomplate.defaultProps = {
2312
3142
  required: false
2313
3143
  };
2314
3144
 
2315
- var css_248z = "textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
2316
- styleInject(css_248z);
2317
-
2318
- const Textarea = ({
2319
- size,
3145
+ const NewAutocomplete = ({
2320
3146
  label,
2321
- width,
2322
- value,
2323
- height,
2324
- resize,
2325
- border,
2326
- radius,
2327
- padding,
3147
+ options,
3148
+ getItem,
2328
3149
  required,
2329
- onChange,
2330
- minWidth,
2331
- maxWidth,
2332
- minHeight,
2333
- maxHeight,
2334
- boxSizing,
2335
- maxLength,
3150
+ disabled,
3151
+ errorSize,
2336
3152
  labelSize,
3153
+ errorColor,
2337
3154
  labelColor,
2338
- borderColor,
2339
3155
  labelWeight,
2340
- placeholder,
3156
+ searchCount,
3157
+ placeHolder,
3158
+ errorMessage,
3159
+ autoComplete,
2341
3160
  labelDisplay,
2342
- backgroundColor,
2343
- borderFocusColor,
2344
- borderHoverColor,
2345
- labelRequiredColor
3161
+ contentDisplay,
3162
+ contentTopSize,
3163
+ contentPosition,
3164
+ contentTopColor,
3165
+ labelLineHeight,
3166
+ contentDirection,
3167
+ contentTopWeight,
3168
+ contentTopRadius,
3169
+ contentTopHeight,
3170
+ contentTopBorder,
3171
+ labelMarginBottom,
3172
+ contentTopDisplay,
3173
+ contentTopPadding,
3174
+ contentBottomLeft,
3175
+ showOptionDuration,
3176
+ labelRequiredColor,
3177
+ contentTopMaxWidth,
3178
+ labelTextTransform,
3179
+ contentBottomWidth,
3180
+ contentBottomZindex,
3181
+ contentBottomRadius,
3182
+ contentTopDirection,
3183
+ contentTopBoxSizing,
3184
+ contentTopLineHeight,
3185
+ contentTopBorderColor,
3186
+ contentBottomMaxWidth,
3187
+ contentBottomOverflow,
3188
+ contentBottomPosition,
3189
+ contentBottomRowColor,
3190
+ contentBottomMinHeight,
3191
+ contentBottomBoxShadow,
3192
+ contentBottomRowHeight,
3193
+ contentBottomRowCursor,
3194
+ contentBottomRowDisplay,
3195
+ contentBottomRowPadding,
3196
+ contentBottomRowFontSize,
3197
+ contentBottomRowBoxSizing,
3198
+ contentBottomInnerDisplay,
3199
+ contentBottomRowFontWeight,
3200
+ contentBottomRowLineHeight,
3201
+ contentBottomRowAlignItems,
3202
+ contentBottomRowTransition,
3203
+ contentBottomRowHoverColor,
3204
+ contentTopBorderHoverColor,
3205
+ contentTopBorderActiveColor,
3206
+ contentBottomInnerOverflowY,
3207
+ contentBottomInnerOverflowX,
3208
+ contentBottomInnerMaxHeight,
3209
+ contentBottomInnerDirection,
3210
+ contentBottomBackgroundColor,
3211
+ contentBottomRowMarginBottom,
3212
+ contentBottomRowBackgroundColor,
3213
+ contentBottomRowHoverBackgroundColor,
3214
+ ...props
2346
3215
  }) => {
3216
+ const [show, setShow] = React.useState(false);
2347
3217
  const [isHover, setIsHover] = React.useState(false);
2348
3218
  const [isFocus, setIsFocus] = React.useState(false);
3219
+ const [innerValue, setInnerValue] = React.useState('');
2349
3220
  const configStyles = compereConfigs();
3221
+ const showOption = styled.keyframes`
3222
+ 100% {
3223
+ max-height: 400px;
3224
+ }
3225
+ `;
3226
+ const animation = _ => styled.css`
3227
+ ${showOption} ${showOptionDuration ? showOptionDuration : configStyles.NEWAUTOCOMPLETE.showOptionDuration} linear forwards
3228
+ `;
2350
3229
  const handleMouseEnter = () => {
2351
3230
  setIsHover(true);
2352
3231
  };
2353
3232
  const handleMouseLeave = () => {
2354
3233
  setIsHover(false);
2355
3234
  };
3235
+ const handleRowMouseEnter = e => {
3236
+ e.target.style.color = contentBottomRowHoverColor ? contentBottomRowHoverColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowHoverColor;
3237
+ e.target.style.backgroundColor = contentBottomRowHoverBackgroundColor ? contentBottomRowHoverBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowHoverBackgroundColor;
3238
+ };
3239
+ const handleRowMouseLeave = e => {
3240
+ e.target.style.color = contentBottomRowColor ? contentBottomRowColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowColor;
3241
+ e.target.style.backgroundColor = contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowBackgroundColor;
3242
+ };
2356
3243
  const handleFocus = () => {
2357
3244
  setIsFocus(true);
2358
3245
  };
2359
3246
  const handleBlur = () => {
2360
3247
  setIsFocus(false);
2361
3248
  };
3249
+ const handleChange = e => {
3250
+ const value = e.target.value;
3251
+ value.length > 0 ? setShow(true) : setShow(false);
3252
+ setInnerValue(value);
3253
+ };
3254
+ const handleClick = selectedValue => {
3255
+ setShow(false);
3256
+ getItem(selectedValue);
3257
+ setInnerValue(selectedValue.value);
3258
+ };
3259
+ const optionList = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, show && options && options.length > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
3260
+ style: {
3261
+ left: contentBottomLeft ? contentBottomLeft : configStyles.NEWAUTOCOMPLETE.contentBottomLeft,
3262
+ width: contentBottomWidth ? contentBottomWidth : configStyles.NEWAUTOCOMPLETE.contentBottomWidth,
3263
+ zIndex: contentBottomZindex ? contentBottomZindex : configStyles.NEWAUTOCOMPLETE.contentBottomZindex,
3264
+ borderRadius: contentBottomRadius ? contentBottomRadius : configStyles.NEWAUTOCOMPLETE.contentBottomRadius,
3265
+ maxWidth: contentBottomMaxWidth ? contentBottomMaxWidth : configStyles.NEWAUTOCOMPLETE.contentBottomMaxWidth,
3266
+ overflow: contentBottomOverflow ? contentBottomOverflow : configStyles.NEWAUTOCOMPLETE.contentBottomOverflow,
3267
+ position: contentBottomPosition ? contentBottomPosition : configStyles.NEWAUTOCOMPLETE.contentBottomPosition,
3268
+ minHeight: contentBottomMinHeight ? contentBottomMinHeight : configStyles.NEWAUTOCOMPLETE.contentBottomMinHeight,
3269
+ boxShadow: contentBottomBoxShadow ? contentBottomBoxShadow : configStyles.NEWAUTOCOMPLETE.contentBottomBoxShadow,
3270
+ backgroundColor: contentBottomBackgroundColor ? contentBottomBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomBackgroundColor,
3271
+ top: contentTopHeight ? contentTopHeight.includes('rem') ? parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(contentTopHeight.substr(0, contentTopHeight.length - 2)) + 6 + 'px' : configStyles.NEWAUTOCOMPLETE.contentTopHeight.includes('rem') ? parseFloat(configStyles.NEWAUTOCOMPLETE.contentTopHeight.substr(0, configStyles.NEWAUTOCOMPLETE.contentTopHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.NEWAUTOCOMPLETE.contentTopHeight.substr(0, configStyles.NEWAUTOCOMPLETE.contentTopHeight.length - 2)) + 6 + 'px',
3272
+ animation
3273
+ }
3274
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
3275
+ style: {
3276
+ display: contentBottomInnerDisplay ? contentBottomInnerDisplay : configStyles.NEWAUTOCOMPLETE.contentBottomInnerDisplay,
3277
+ overflowY: contentBottomInnerOverflowY ? contentBottomInnerOverflowY : configStyles.NEWAUTOCOMPLETE.contentBottomInnerOverflowY,
3278
+ overflowX: contentBottomInnerOverflowX ? contentBottomInnerOverflowX : configStyles.NEWAUTOCOMPLETE.contentBottomInnerOverflowX,
3279
+ maxHeight: contentBottomInnerMaxHeight ? contentBottomInnerMaxHeight : configStyles.NEWAUTOCOMPLETE.contentBottomInnerMaxHeight,
3280
+ flexDirection: contentBottomInnerDirection ? contentBottomInnerDirection : configStyles.NEWAUTOCOMPLETE.contentBottomInnerDirection
3281
+ }
3282
+ }, innerValue.length >= searchCount ? options.filter(item => item.value.includes(innerValue)).length > 0 ? options.filter(item => item.value.includes(innerValue)).map((item, index) => {
3283
+ return /*#__PURE__*/React__default["default"].createElement("p", {
3284
+ key: `${item}_${index}`,
3285
+ onMouseEnter: handleRowMouseEnter,
3286
+ onMouseLeave: handleRowMouseLeave,
3287
+ onClick: () => handleClick(item),
3288
+ style: {
3289
+ flexShrink: 0,
3290
+ color: contentBottomRowColor ? contentBottomRowColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowColor,
3291
+ height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight,
3292
+ cursor: contentBottomRowCursor ? contentBottomRowCursor : configStyles.NEWAUTOCOMPLETE.contentBottomRowCursor,
3293
+ display: contentBottomRowDisplay ? contentBottomRowDisplay : configStyles.NEWAUTOCOMPLETE.contentBottomRowDisplay,
3294
+ padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.NEWAUTOCOMPLETE.contentBottomRowPadding,
3295
+ fontSize: contentBottomRowFontSize ? contentBottomRowFontSize : configStyles.NEWAUTOCOMPLETE.contentBottomRowFontSize,
3296
+ boxSizing: contentBottomRowBoxSizing ? contentBottomRowBoxSizing : configStyles.NEWAUTOCOMPLETE.contentBottomRowBoxSizing,
3297
+ fontWeight: contentBottomRowFontWeight ? contentBottomRowFontWeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowFontWeight,
3298
+ lineHeight: contentBottomRowLineHeight ? contentBottomRowLineHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowLineHeight,
3299
+ alignItems: contentBottomRowAlignItems ? contentBottomRowAlignItems : configStyles.NEWAUTOCOMPLETE.contentBottomRowAlignItems,
3300
+ transition: contentBottomRowTransition ? contentBottomRowTransition : configStyles.NEWAUTOCOMPLETE.contentBottomRowTransition,
3301
+ marginBottom: contentBottomRowMarginBottom ? contentBottomRowMarginBottom : configStyles.NEWAUTOCOMPLETE.contentBottomRowMarginBottom,
3302
+ backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowBackgroundColor
3303
+ }
3304
+ }, item.value);
3305
+ }) : /*#__PURE__*/React__default["default"].createElement("p", {
3306
+ style: {
3307
+ color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
3308
+ fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
3309
+ height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight,
3310
+ padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.NEWAUTOCOMPLETE.contentBottomRowPadding,
3311
+ lineHeight: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight
3312
+ }
3313
+ }, "\u0546\u0574\u0561\u0576 \u057F\u057E\u0575\u0561\u056C \u0561\u057C\u056F\u0561 \u0579\u0567") : /*#__PURE__*/React__default["default"].createElement("p", {
3314
+ style: {
3315
+ color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
3316
+ fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize,
3317
+ height: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight,
3318
+ padding: contentBottomRowPadding ? contentBottomRowPadding : configStyles.NEWAUTOCOMPLETE.contentBottomRowPadding,
3319
+ lineHeight: contentBottomRowHeight ? contentBottomRowHeight : configStyles.NEWAUTOCOMPLETE.contentBottomRowHeight
3320
+ }
3321
+ }, innerValue.length < searchCount && `Լրացնել առնվազն ${searchCount} նիշ`))));
2362
3322
  React.useEffect(() => {
2363
- if (value === undefined) {
2364
- alert('Please add value prop on Textarea component');
3323
+ if (!options) {
3324
+ alert('Please add array of options');
2365
3325
  }
2366
- if (!onChange) {
2367
- alert('Please add onChange function on Textarea component');
3326
+ if (options.length === 0) {
3327
+ alert('Please fill options array');
2368
3328
  }
2369
- }, [value, onChange]);
3329
+ options && options.length > 0 && options.map(item => {
3330
+ if (!item.hasOwnProperty('value')) {
3331
+ alert('Please add value property in items of options array');
3332
+ }
3333
+ });
3334
+ if (!getItem) {
3335
+ alert('Please add getItem function for get choosen item from autocomplete');
3336
+ }
3337
+ }, [options, getItem]);
2370
3338
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
2371
3339
  style: {
2372
- color: labelColor ? labelColor : configStyles.TEXTAREA.labelColor,
2373
- fontSize: labelSize ? labelSize : configStyles.TEXTAREA.labelSize,
2374
- display: labelDisplay ? labelDisplay : configStyles.TEXTAREA.labelDisplay,
2375
- fontWeight: labelWeight ? labelWeight : configStyles.TEXTAREA.labelWeight
3340
+ color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
3341
+ fontSize: labelSize ? labelSize : configStyles.NEWAUTOCOMPLETE.labelSize,
3342
+ display: labelDisplay ? labelDisplay : configStyles.NEWAUTOCOMPLETE.labelDisplay,
3343
+ fontWeight: labelWeight ? labelWeight : configStyles.NEWAUTOCOMPLETE.labelWeight,
3344
+ lineHeight: labelLineHeight ? labelLineHeight : configStyles.NEWAUTOCOMPLETE.labelLineHeight,
3345
+ marginBottom: labelMarginBottom ? labelMarginBottom : configStyles.NEWAUTOCOMPLETE.labelMarginBottom,
3346
+ textTransform: labelTextTransform ? labelTextTransform : configStyles.NEWAUTOCOMPLETE.labelTextTransform
2376
3347
  }
2377
3348
  }, label, required && /*#__PURE__*/React__default["default"].createElement("sup", {
2378
3349
  style: {
2379
- color: labelRequiredColor ? labelRequiredColor : configStyles.TEXTAREA.labelRequiredColor
3350
+ color: labelRequiredColor ? labelRequiredColor : configStyles.NEWAUTOCOMPLETE.labelRequiredColor
2380
3351
  }
2381
- }, "*")) : '', /*#__PURE__*/React__default["default"].createElement("textarea", {
3352
+ }, "*")) : '', /*#__PURE__*/React__default["default"].createElement("div", {
2382
3353
  style: {
2383
- outline: 'none',
2384
- overflow: 'auto',
2385
- fontSize: size ? size : configStyles.TEXTAREA.size,
2386
- width: width ? width : configStyles.TEXTAREA.width,
2387
- height: height ? height : configStyles.TEXTAREA.height,
2388
- border: border ? border : configStyles.TEXTAREA.border,
2389
- padding: padding ? padding : configStyles.TEXTAREA.padding,
2390
- borderRadius: radius ? radius : configStyles.TEXTAREA.radius,
2391
- minWidth: minWidth ? minWidth : configStyles.TEXTAREA.minWidth,
2392
- maxWidth: maxWidth ? maxWidth : configStyles.TEXTAREA.maxWidth,
2393
- minHeight: minHeight ? minHeight : configStyles.TEXTAREA.minHeight,
2394
- maxHeight: maxHeight ? maxHeight : configStyles.TEXTAREA.maxHeight,
2395
- boxSizing: boxSizing ? boxSizing : configStyles.TEXTAREA.boxSizing,
2396
- backgroundColor: backgroundColor ? backgroundColor : configStyles.TEXTAREA.backgroundColor,
2397
- borderColor: isFocus ? borderFocusColor ? borderFocusColor : configStyles.TEXTAREA.borderFocusColor : isHover ? borderHoverColor ? borderHoverColor : configStyles.TEXTAREA.borderHoverColor : borderColor ? borderColor : configStyles.TEXTAREA.borderColor,
2398
- resize: resize ? resize : configStyles.TEXTAREA.resize
2399
- },
3354
+ display: contentDisplay ? contentDisplay : configStyles.NEWAUTOCOMPLETE.contentDisplay,
3355
+ position: contentPosition ? contentPosition : configStyles.NEWAUTOCOMPLETE.contentPosition,
3356
+ flexDirection: contentDirection ? contentDirection : configStyles.NEWAUTOCOMPLETE.contentDirection
3357
+ }
3358
+ }, /*#__PURE__*/React__default["default"].createElement("input", _extends({
3359
+ type: "text",
3360
+ value: innerValue,
3361
+ disabled: disabled,
2400
3362
  onBlur: handleBlur,
2401
- onChange: onChange,
2402
3363
  onFocus: handleFocus,
2403
- placeholder: placeholder,
3364
+ onInput: handleChange,
3365
+ placeholder: placeHolder ? placeHolder : '',
3366
+ autoComplete: autoComplete ? autoComplete : configStyles.NEWAUTOCOMPLETE.autoComplete,
2404
3367
  onMouseEnter: handleMouseEnter,
2405
3368
  onMouseLeave: handleMouseLeave,
2406
- value: maxLength ? value.length > maxLength ? value.substr(0, maxLength) : value : configStyles.TEXTAREA.maxLength ? value.length > configStyles.TEXTAREA.maxLength ? value.substr(0, configStyles.TEXTAREA.maxLength) : value : value
2407
- }));
3369
+ style: {
3370
+ transition: 'all 240ms',
3371
+ cursor: disabled ? 'not-allowed' : 'auto',
3372
+ color: contentTopColor ? contentTopColor : configStyles.NEWAUTOCOMPLETE.contentTopColor,
3373
+ fontSize: contentTopSize ? contentTopSize : configStyles.NEWAUTOCOMPLETE.contentTopSize,
3374
+ height: contentTopHeight ? contentTopHeight : configStyles.NEWAUTOCOMPLETE.contentTopHeight,
3375
+ border: contentTopBorder ? contentTopBorder : configStyles.NEWAUTOCOMPLETE.contentTopBorder,
3376
+ padding: contentTopPadding ? contentTopPadding : configStyles.NEWAUTOCOMPLETE.contentTopPadding,
3377
+ display: contentTopDisplay ? contentTopDisplay : configStyles.NEWAUTOCOMPLETE.contentTopDisplay,
3378
+ fontWeight: contentTopWeight ? contentTopWeight : configStyles.NEWAUTOCOMPLETE.contentTopWeight,
3379
+ borderRadius: contentTopRadius ? contentTopRadius : configStyles.NEWAUTOCOMPLETE.contentTopRadius,
3380
+ maxWidth: contentTopMaxWidth ? contentTopMaxWidth : configStyles.NEWAUTOCOMPLETE.contentTopMaxWidth,
3381
+ boxSizing: contentTopBoxSizing ? contentTopBoxSizing : configStyles.NEWAUTOCOMPLETE.contentTopBoxSizing,
3382
+ lineHeight: contentTopLineHeight ? contentTopLineHeight : configStyles.NEWAUTOCOMPLETE.contentTopLineHeight,
3383
+ flexDirection: contentTopDirection ? contentTopDirection : configStyles.NEWAUTOCOMPLETE.contentTopDirection,
3384
+ borderColor: errorMessage ? errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor : isFocus ? contentTopBorderActiveColor ? contentTopBorderActiveColor : configStyles.NEWAUTOCOMPLETE.contentTopBorderActiveColor : isHover ? contentTopBorderHoverColor ? contentTopBorderHoverColor : configStyles.NEWAUTOCOMPLETE.contentTopBorderHoverColor : contentTopBorderColor ? contentTopBorderColor : configStyles.NEWAUTOCOMPLETE.contentTopBorderColor
3385
+ }
3386
+ }, props)), errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
3387
+ style: {
3388
+ color: errorColor ? errorColor : configStyles.NEWAUTOCOMPLETE.errorColor,
3389
+ fontSize: errorSize ? errorSize : configStyles.NEWAUTOCOMPLETE.errorSize
3390
+ }
3391
+ }, errorMessage) : '', optionList));
2408
3392
  };
2409
- Textarea.propTypes = {
2410
- size: PropTypes__default["default"].string,
3393
+ NewAutocomplete.propTypes = {
2411
3394
  label: PropTypes__default["default"].string,
2412
- width: PropTypes__default["default"].string,
2413
- height: PropTypes__default["default"].string,
2414
- resize: PropTypes__default["default"].string,
2415
- border: PropTypes__default["default"].string,
2416
- radius: PropTypes__default["default"].string,
2417
3395
  required: PropTypes__default["default"].bool,
2418
- padding: PropTypes__default["default"].string,
2419
- minWidth: PropTypes__default["default"].string,
2420
- maxWidth: PropTypes__default["default"].string,
2421
- boxSizing: PropTypes__default["default"].string,
2422
- minHeight: PropTypes__default["default"].string,
2423
- maxHeight: PropTypes__default["default"].string,
2424
- maxLength: PropTypes__default["default"].number,
3396
+ disabled: PropTypes__default["default"].bool,
3397
+ errorSize: PropTypes__default["default"].string,
2425
3398
  labelSize: PropTypes__default["default"].string,
3399
+ errorColor: PropTypes__default["default"].string,
2426
3400
  labelColor: PropTypes__default["default"].string,
2427
- labelWeight: PropTypes__default["default"].string,
2428
- borderColor: PropTypes__default["default"].string,
2429
- placeholder: PropTypes__default["default"].string,
3401
+ searchCount: PropTypes__default["default"].number,
3402
+ placeHolder: PropTypes__default["default"].string,
3403
+ labelWeight: PropTypes__default["default"].number,
3404
+ errorMessage: PropTypes__default["default"].string,
2430
3405
  labelDisplay: PropTypes__default["default"].string,
2431
- backgroundColor: PropTypes__default["default"].string,
2432
- value: PropTypes__default["default"].string.isRequired,
2433
- borderFocusColor: PropTypes__default["default"].string,
2434
- borderHoverColor: PropTypes__default["default"].string,
2435
- onChange: PropTypes__default["default"].func.isRequired,
2436
- labelRequiredColor: PropTypes__default["default"].string
3406
+ autoComplete: PropTypes__default["default"].string,
3407
+ contentDisplay: PropTypes__default["default"].string,
3408
+ contentTopSize: PropTypes__default["default"].string,
3409
+ contentPosition: PropTypes__default["default"].string,
3410
+ labelLineHeight: PropTypes__default["default"].string,
3411
+ contentTopColor: PropTypes__default["default"].string,
3412
+ contentDirection: PropTypes__default["default"].string,
3413
+ contentTopWeight: PropTypes__default["default"].number,
3414
+ contentTopRadius: PropTypes__default["default"].string,
3415
+ contentTopHeight: PropTypes__default["default"].string,
3416
+ contentTopBorder: PropTypes__default["default"].string,
3417
+ getItem: PropTypes__default["default"].func.isRequired,
3418
+ contentTopDisplay: PropTypes__default["default"].string,
3419
+ contentTopPadding: PropTypes__default["default"].string,
3420
+ contentBottomLeft: PropTypes__default["default"].string,
3421
+ options: PropTypes__default["default"].array.isRequired,
3422
+ labelMarginBottom: PropTypes__default["default"].string,
3423
+ labelRequiredColor: PropTypes__default["default"].string,
3424
+ labelTextTransform: PropTypes__default["default"].string,
3425
+ showOptionDuration: PropTypes__default["default"].string,
3426
+ contentTopMaxWidth: PropTypes__default["default"].string,
3427
+ contentBottomWidth: PropTypes__default["default"].string,
3428
+ contentTopDirection: PropTypes__default["default"].string,
3429
+ contentTopBoxSizing: PropTypes__default["default"].string,
3430
+ contentBottomZindex: PropTypes__default["default"].number,
3431
+ contentBottomRadius: PropTypes__default["default"].string,
3432
+ contentTopLineHeight: PropTypes__default["default"].string,
3433
+ contentTopBorderColor: PropTypes__default["default"].string,
3434
+ contentBottomRowColor: PropTypes__default["default"].string,
3435
+ contentBottomMaxWidth: PropTypes__default["default"].string,
3436
+ contentBottomOverflow: PropTypes__default["default"].string,
3437
+ contentBottomPosition: PropTypes__default["default"].string,
3438
+ contentBottomMinHeight: PropTypes__default["default"].string,
3439
+ contentBottomBoxShadow: PropTypes__default["default"].string,
3440
+ contentBottomRowHeight: PropTypes__default["default"].string,
3441
+ contentBottomRowCursor: PropTypes__default["default"].string,
3442
+ contentBottomRowDisplay: PropTypes__default["default"].string,
3443
+ contentBottomRowPadding: PropTypes__default["default"].string,
3444
+ contentBottomRowFontSize: PropTypes__default["default"].string,
3445
+ contentBottomRowBoxSizing: PropTypes__default["default"].string,
3446
+ contentBottomInnerDisplay: PropTypes__default["default"].string,
3447
+ contentBottomRowFontWeight: PropTypes__default["default"].number,
3448
+ contentBottomRowLineHeight: PropTypes__default["default"].string,
3449
+ contentBottomRowAlignItems: PropTypes__default["default"].string,
3450
+ contentBottomRowTransition: PropTypes__default["default"].string,
3451
+ contentBottomRowHoverColor: PropTypes__default["default"].string,
3452
+ contentTopBorderHoverColor: PropTypes__default["default"].string,
3453
+ contentTopBorderActiveColor: PropTypes__default["default"].string,
3454
+ contentBottomInnerOverflowY: PropTypes__default["default"].string,
3455
+ contentBottomInnerOverflowX: PropTypes__default["default"].string,
3456
+ contentBottomInnerMaxHeight: PropTypes__default["default"].string,
3457
+ contentBottomInnerDirection: PropTypes__default["default"].string,
3458
+ contentBottomRowMarginBottom: PropTypes__default["default"].string,
3459
+ contentBottomBackgroundColor: PropTypes__default["default"].string,
3460
+ contentBottomRowBackgroundColor: PropTypes__default["default"].string,
3461
+ contentBottomRowHoverBackgroundColor: PropTypes__default["default"].string
3462
+ };
3463
+ NewAutocomplete.defaultProps = {
3464
+ searchCount: 3,
3465
+ disabled: false
2437
3466
  };
2438
3467
 
2439
3468
  exports.Autocomplate = Autocomplate;
@@ -2444,6 +3473,8 @@ exports.File = File;
2444
3473
  exports.Input = Input;
2445
3474
  exports.InputTypes = InputTypes;
2446
3475
  exports.Modal = Modal;
3476
+ exports.NewAutocomplete = NewAutocomplete;
3477
+ exports.NewFile = NewFile;
2447
3478
  exports.Pagination = Pagination;
2448
3479
  exports.Radio = Radio;
2449
3480
  exports.Select = Select;