@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
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- const Dots = ({ title, titleId, ...props }) => (
2
+ const SvgDots = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="11"
5
+ height="3"
6
6
  viewBox="0 0 11 3"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -11,9 +11,9 @@ const Dots = ({ title, titleId, ...props }) => (
11
11
  >
12
12
  {title ? <title id={titleId}>{title}</title> : null}
13
13
  <path
14
- 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"
15
- fill="#3C393E"
14
+ 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"
15
+ fill="#3C393E"
16
16
  />
17
17
  </svg>
18
18
  );
19
- export default Dots;
19
+ export default SvgDots;
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ const SvgListItemDelete = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="22"
5
+ height="22"
6
+ viewBox="0 0 22 22"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <path
14
+ 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"
15
+ fill="#051942"
16
+ />
17
+ </svg>
18
+ );
19
+ export default SvgListItemDelete;
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ const SvgListItemJpg = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="32"
5
+ height="42"
6
+ viewBox="0 0 32 42"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <path
14
+ fillRule="evenodd"
15
+ clipRule="evenodd"
16
+ 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"
17
+ fill="#051942"
18
+ />
19
+ </svg>
20
+ );
21
+ export default SvgListItemJpg;
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ const SvgListItemPdf = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="32"
5
+ height="42"
6
+ viewBox="0 0 32 42"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <path
14
+ fillRule="evenodd"
15
+ clipRule="evenodd"
16
+ 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"
17
+ fill="#051942"
18
+ />
19
+ </svg>
20
+ );
21
+ export default SvgListItemPdf;
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ const SvgNextarrow = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="6"
5
+ height="12"
6
+ viewBox="0 0 6 12"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <path
14
+ 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"
15
+ fill="#3C393E"
16
+ />
17
+ </svg>
18
+ );
19
+ export default SvgNextarrow;
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ const SvgPdf = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="40"
5
+ height="52"
6
+ viewBox="0 0 40 52"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <path
14
+ 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"
15
+ fill="#00236A"
16
+ />
17
+ </svg>
18
+ );
19
+ export default SvgPdf;
@@ -0,0 +1,54 @@
1
+ import * as React from "react";
2
+ const SvgRangeArrowDefault = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="1em"
5
+ height="1em"
6
+ viewBox="0 0 46 46"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <g filter="url(#range-arrow-default_svg__a)">
14
+ <circle cx={22} cy={23} r={15} fill="#00236A" />
15
+ <circle cx={22} cy={23} r={16} stroke="#fff" strokeWidth={2} />
16
+ </g>
17
+ <path
18
+ d="M25.998 23.011c0 .233-.081.46-.23.639l-4.998 5.99a1.001 1.001 0 0 1-1.539-1.278l4.478-5.351-4.318-5.35a.998.998 0 0 1 .15-1.408 1 1 0 0 1 1.46.14l4.827 5.99a.997.997 0 0 1 .17.628Z"
19
+ fill="#fff"
20
+ />
21
+ <defs>
22
+ <filter
23
+ id="range-arrow-default_svg__a"
24
+ x={0}
25
+ y={0}
26
+ width={46}
27
+ height={46}
28
+ filterUnits="userSpaceOnUse"
29
+ colorInterpolationFilters="sRGB"
30
+ >
31
+ <feFlood floodOpacity={0} result="BackgroundImageFix" />
32
+ <feColorMatrix
33
+ in="SourceAlpha"
34
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
35
+ result="hardAlpha"
36
+ />
37
+ <feOffset dx={1} />
38
+ <feGaussianBlur stdDeviation={3} />
39
+ <feComposite in2="hardAlpha" operator="out" />
40
+ <feColorMatrix values="0 0 0 0 0.235289 0 0 0 0 0.222535 0 0 0 0 0.241667 0 0 0 0.15 0" />
41
+ <feBlend
42
+ in2="BackgroundImageFix"
43
+ result="effect1_dropShadow_1946_21917"
44
+ />
45
+ <feBlend
46
+ in="SourceGraphic"
47
+ in2="effect1_dropShadow_1946_21917"
48
+ result="shape"
49
+ />
50
+ </filter>
51
+ </defs>
52
+ </svg>
53
+ );
54
+ export default SvgRangeArrowDefault;
@@ -0,0 +1,54 @@
1
+ import * as React from "react";
2
+ const SvgRangeArrowError = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="1em"
5
+ height="1em"
6
+ viewBox="0 0 46 46"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <g filter="url(#range-arrow-error_svg__a)">
14
+ <circle cx={22} cy={23} r={15} fill="#E00" />
15
+ <circle cx={22} cy={23} r={16} stroke="#fff" strokeWidth={2} />
16
+ </g>
17
+ <path
18
+ d="M25.998 23.011c0 .233-.081.46-.23.639l-4.998 5.99a1.001 1.001 0 0 1-1.539-1.278l4.478-5.351-4.318-5.35a.998.998 0 0 1 .15-1.408 1 1 0 0 1 1.46.14l4.827 5.99a.997.997 0 0 1 .17.628Z"
19
+ fill="#fff"
20
+ />
21
+ <defs>
22
+ <filter
23
+ id="range-arrow-error_svg__a"
24
+ x={0}
25
+ y={0}
26
+ width={46}
27
+ height={46}
28
+ filterUnits="userSpaceOnUse"
29
+ colorInterpolationFilters="sRGB"
30
+ >
31
+ <feFlood floodOpacity={0} result="BackgroundImageFix" />
32
+ <feColorMatrix
33
+ in="SourceAlpha"
34
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
35
+ result="hardAlpha"
36
+ />
37
+ <feOffset dx={1} />
38
+ <feGaussianBlur stdDeviation={3} />
39
+ <feComposite in2="hardAlpha" operator="out" />
40
+ <feColorMatrix values="0 0 0 0 0.235289 0 0 0 0 0.222535 0 0 0 0 0.241667 0 0 0 0.15 0" />
41
+ <feBlend
42
+ in2="BackgroundImageFix"
43
+ result="effect1_dropShadow_1946_21948"
44
+ />
45
+ <feBlend
46
+ in="SourceGraphic"
47
+ in2="effect1_dropShadow_1946_21948"
48
+ result="shape"
49
+ />
50
+ </filter>
51
+ </defs>
52
+ </svg>
53
+ );
54
+ export default SvgRangeArrowError;
@@ -0,0 +1,54 @@
1
+ import * as React from "react";
2
+ const SvgRangeArrowSuccess = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="1em"
5
+ height="1em"
6
+ viewBox="0 0 46 46"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <g filter="url(#range-arrow-success_svg__a)">
14
+ <circle cx={22} cy={23} r={15} fill="#0DA574" />
15
+ <circle cx={22} cy={23} r={16} stroke="#fff" strokeWidth={2} />
16
+ </g>
17
+ <path
18
+ d="M25.998 23.011c0 .233-.081.46-.23.639l-4.998 5.99a1.001 1.001 0 0 1-1.539-1.278l4.478-5.351-4.318-5.35a.998.998 0 0 1 .15-1.408 1 1 0 0 1 1.46.14l4.827 5.99a.997.997 0 0 1 .17.628Z"
19
+ fill="#fff"
20
+ />
21
+ <defs>
22
+ <filter
23
+ id="range-arrow-success_svg__a"
24
+ x={0}
25
+ y={0}
26
+ width={46}
27
+ height={46}
28
+ filterUnits="userSpaceOnUse"
29
+ colorInterpolationFilters="sRGB"
30
+ >
31
+ <feFlood floodOpacity={0} result="BackgroundImageFix" />
32
+ <feColorMatrix
33
+ in="SourceAlpha"
34
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
35
+ result="hardAlpha"
36
+ />
37
+ <feOffset dx={1} />
38
+ <feGaussianBlur stdDeviation={3} />
39
+ <feComposite in2="hardAlpha" operator="out" />
40
+ <feColorMatrix values="0 0 0 0 0.235289 0 0 0 0 0.222535 0 0 0 0 0.241667 0 0 0 0.15 0" />
41
+ <feBlend
42
+ in2="BackgroundImageFix"
43
+ result="effect1_dropShadow_1946_21947"
44
+ />
45
+ <feBlend
46
+ in="SourceGraphic"
47
+ in2="effect1_dropShadow_1946_21947"
48
+ result="shape"
49
+ />
50
+ </filter>
51
+ </defs>
52
+ </svg>
53
+ );
54
+ export default SvgRangeArrowSuccess;
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ const SvgRemoveFile = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="26"
5
+ height="26"
6
+ viewBox="0 0 26 26"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <rect width={26} height={26} rx={6} fill="#FBFBFB" />
14
+ <path
15
+ 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"
16
+ fill="#00236A"
17
+ />
18
+ </svg>
19
+ );
20
+ export default SvgRemoveFile;
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  const SvgToasterClose = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="18"
5
+ height="18"
6
6
  viewBox="0 0 18 18"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  const SvgToasterError = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="24"
5
+ height="24"
6
6
  viewBox="0 0 24 24"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  const SvgToasterInfo = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="24"
5
+ height="24"
6
6
  viewBox="0 0 24 24"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  const SvgToasterSuccess = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="24"
5
+ height="24"
6
6
  viewBox="0 0 24 24"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  const SvgToasterWarning = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="24"
5
+ height="24"
6
6
  viewBox="0 0 24 21"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  const SvgTooltip = ({ title, titleId, ...props }) => (
3
3
  <svg
4
- width="1em"
5
- height="1em"
4
+ width="16"
5
+ height="16"
6
6
  viewBox="0 0 16 16"
7
7
  fill="none"
8
8
  xmlns="http://www.w3.org/2000/svg"
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ const SvgUpload = ({ title, titleId, ...props }) => (
3
+ <svg
4
+ width="51"
5
+ height="35"
6
+ viewBox="0 0 51 35"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ aria-labelledby={titleId}
10
+ {...props}
11
+ >
12
+ {title ? <title id={titleId}>{title}</title> : null}
13
+ <path
14
+ 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"
15
+ fill="#D1D1D1"
16
+ />
17
+ <path
18
+ fillRule="evenodd"
19
+ clipRule="evenodd"
20
+ 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"
21
+ fill="#0DA574"
22
+ />
23
+ </svg>
24
+ );
25
+ export default SvgUpload;
@@ -1,10 +1 @@
1
- export { default as Arrow } from "./Arrow";
2
- export { default as CheckboxChecked } from "./CheckboxChecked";
3
- export { default as CheckboxUnchecked } from "./CheckboxUnchecked";
4
- export { default as CloseIcon } from "./CloseIcon";
5
- export { default as ToasterClose } from "./ToasterClose";
6
- export { default as ToasterError } from "./ToasterError";
7
- export { default as ToasterInfo } from "./ToasterInfo";
8
- export { default as ToasterSuccess } from "./ToasterSuccess";
9
- export { default as ToasterWarning } from "./ToasterWarning";
10
- export { default as Tooltip } from "./Tooltip";
1
+ export { default as ListItemDelete } from "./ListItemDelete";
@@ -64,7 +64,7 @@ export const Input = ({
64
64
  errorAnimationDuration,
65
65
  ...props
66
66
  }) => {
67
- const phoneNumberRegex = /^\d{8}$/;
67
+ const phoneNumberRegex = /^\d+$/;
68
68
  const [show, setShow] = useState(false);
69
69
  const [isHover, setIsHover] = useState(false);
70
70
  const [innerValue, setInnerValue] = useState('');
@@ -100,33 +100,36 @@ export const Input = ({
100
100
 
101
101
  setInnerValue(currentValue);
102
102
  if (type === 'tel') {
103
- if (currentValue.length > 8) {
104
- setInnerValue(currentValue.substr(0, 8));
105
- }
106
-
107
- if (!phoneNumberRegex.test(currentValue) && telErrorMessage) {
108
- setInnerErrorMessage(telErrorMessage);
103
+ if (!phoneNumberRegex.test(currentValue)) {
104
+ telErrorMessage && setInnerErrorMessage(telErrorMessage);
105
+ setInnerValue('');
109
106
  } else {
110
107
  setInnerErrorMessage('');
108
+ if (currentValue.length > 8) {
109
+ setInnerValue(currentValue.substr(0, 8));
110
+ if (onChange) {
111
+ onChange(currentValue.substr(0, 8));
112
+ }
113
+ } else {
114
+ setInnerValue(currentValue);
115
+ if (onChange) {
116
+ onChange(currentValue);
117
+ }
118
+ }
111
119
  }
112
120
  }
113
121
 
114
122
  if (maxLength && currentValue.length > maxLength && type !== 'tel') {
115
123
  setInnerValue(currentValue.substr(0, maxLength));
124
+ if (onChange) {
125
+ onChange(currentValue.substr(0, maxLength));
126
+ }
116
127
  }
117
128
 
118
129
  if (regexp && regexpErrorMessage && !maxLength && type !== 'tel') {
119
- !regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('')
120
- }
121
-
122
- if (onChange) {
123
- onChange(currentValue);
124
- if (type === 'tel' && currentValue.length > 8) {
125
- onChange(currentValue.substr(0, 8));
126
- }
127
-
128
- if (maxLength && currentValue.length > maxLength && type !== 'tel') {
129
- onChange(currentValue.substr(0, maxLength));
130
+ !regexp.test(currentValue) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('');
131
+ if (onChange) {
132
+ onChange(currentValue);
130
133
  }
131
134
  }
132
135
  };
@@ -140,19 +143,27 @@ export const Input = ({
140
143
  };
141
144
 
142
145
  useEffect(() => {
146
+ if (errorMessage) {
147
+ setInnerErrorMessage(errorMessage);
148
+ } else {
149
+ setInnerErrorMessage('');
150
+ }
151
+
143
152
  if (value !== undefined && value !== null) {
144
153
  setInnerValue(value);
145
154
  if (type === 'tel') {
146
- if (value.length > 8) {
147
- setInnerValue(value.substr(0, 8));
148
- }
149
-
150
- if (!phoneNumberRegex.test(value) && telErrorMessage) {
151
- setInnerErrorMessage(telErrorMessage);
155
+ if (!phoneNumberRegex.test(currentValue)) {
156
+ telErrorMessage && setInnerErrorMessage(telErrorMessage);
157
+ setInnerValue('');
152
158
  } else {
153
159
  setInnerErrorMessage('');
160
+ if (value.length > 8) {
161
+ setInnerValue(value.substr(0, 8));
162
+ } else {
163
+ setInnerValue(value);
164
+ }
154
165
  }
155
- }
166
+ }
156
167
 
157
168
  if (maxLength && value.length > maxLength && type !== 'tel') {
158
169
  setInnerValue(value.substr(0, maxLength));
@@ -162,12 +173,6 @@ export const Input = ({
162
173
  !regexp.test(value) ? setInnerErrorMessage(regexpErrorMessage) : setInnerErrorMessage('')
163
174
  }
164
175
  }
165
-
166
- if (errorMessage) {
167
- setInnerErrorMessage(errorMessage);
168
- } else {
169
- setInnerErrorMessage('');
170
- }
171
176
  }, [type, value, regexp, maxLength, errorMessage, regexpErrorMessage]);
172
177
 
173
178
  return (
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { NewAutocomplete } from './index';
3
+
4
+ export default {
5
+ component: NewAutocomplete,
6
+ title: 'Components/NewAutocomplete',
7
+ argTypes: {
8
+ options: {
9
+ control: 'array'
10
+ },
11
+ getItem: {
12
+ control: 'function'
13
+ }
14
+ }
15
+ };
16
+
17
+ const Template = (args) => {
18
+ const handleClick = (selected) => {
19
+ console.log(selected, 'selected');
20
+ };
21
+
22
+ return <NewAutocomplete {...args} getItem={handleClick} />
23
+ };
24
+ export const Default = Template.bind({});
25
+ Default.args = {
26
+ searchCount: 3,
27
+ options: [
28
+ {"bbb":"0", "value":"dfsag"},
29
+ {"bbb":"1", "value":"asdfgh"},
30
+ {"bbb":"2", "value":"ghjjjh"},
31
+ {"bbb":"3", "value":"qwembm"},
32
+ {"bbb":"4", "value":"ertmbn"},
33
+ {"bbb":"5", "value":"tyuvxvc"},
34
+ {"bbb":"6", "value":"uiozcvx"},
35
+ {"bbb":"7", "value":"jkljhdfg"},
36
+ {"bbb":"8", "value":"asdfghcxvbcb"},
37
+ {"bbb":"9", "value":"asdfghcxvkbcb"},
38
+ {"bbb":"10", "value":"asdfghcxkkvbcb"},
39
+ {"bbb":"11", "value":"asdfghcxvmmmbcb"},
40
+ {"bbb":"12", "value":"asdfghcxkhjvbcb"},
41
+ {"bbb":"13", "value":"asdfghcxhjkvbcsb"},
42
+ {"bbb":"14", "value":"asdfghcxvbzxccxzcb"},
43
+ {"bbb":"15", "value":"asdfghcxjklljklvbcb"},
44
+ {"bbb":"16", "value":"asdfghcxvbljkljkljkcb"},
45
+ {"bbb":"17", "value":"asdfghcxljkljkljkljvbcb"},
46
+ {"bbb":"18", "value":"asdfghcxiouiouiouiouovbcb"},
47
+ {"bbb":"19", "value":"asdfghcuoiouiouiouiouxvbcb"},
48
+ {"bbb":"20", "value":"asdfghcuiouiouioiouiouixvbcb"}
49
+ ]
50
+ }