@true-engineering/true-react-common-ui-kit 3.41.0 → 3.42.0

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 (101) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +7 -0
  3. package/dist/components/FiltersPane/FiltersPane.stories.d.ts +2 -1
  4. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.styles.d.ts +1 -1
  5. package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +1 -1
  6. package/dist/components/FiltersPane/types.d.ts +1 -0
  7. package/dist/components/Input/Input.styles.d.ts +1 -1
  8. package/dist/components/SearchInput/SearchInput.stories.d.ts +1 -1
  9. package/dist/components/Select/Select.styles.d.ts +3 -3
  10. package/dist/true-react-common-ui-kit.js +74 -59
  11. package/dist/true-react-common-ui-kit.js.map +1 -1
  12. package/dist/true-react-common-ui-kit.umd.cjs +74 -59
  13. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  14. package/package.json +99 -98
  15. package/src/components/AccountInfo/AccountInfo.stories.tsx +32 -32
  16. package/src/components/AccountInfo/AccountInfo.tsx +80 -80
  17. package/src/components/AddButton/AddButton.stories.tsx +21 -21
  18. package/src/components/AddButton/AddButton.tsx +52 -52
  19. package/src/components/Colors/Colors.stories.tsx +7 -7
  20. package/src/components/DateInput/DateInput.tsx +90 -90
  21. package/src/components/DateInput/constants.ts +2 -2
  22. package/src/components/Description/Description.stories.tsx +27 -27
  23. package/src/components/Description/Description.tsx +61 -61
  24. package/src/components/FiltersPane/FiltersPane.stories.tsx +12 -0
  25. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +166 -166
  26. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +210 -210
  27. package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +177 -177
  28. package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.styles.ts +4 -0
  29. package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +20 -2
  30. package/src/components/FiltersPane/types.ts +1 -0
  31. package/src/components/Flag/Flag.stories.tsx +29 -29
  32. package/src/components/Flag/Flag.tsx +26 -26
  33. package/src/components/Flag/augment.d.ts +1 -1
  34. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.ts +25 -25
  35. package/src/components/Icon/Icon.stories.tsx +86 -86
  36. package/src/components/Icon/complexIcons/augment.d.ts +1 -1
  37. package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
  38. package/src/components/Icon/complexIcons/index.ts +1 -1
  39. package/src/components/IncrementInput/IncrementInput.tsx +105 -105
  40. package/src/components/Input/types.ts +32 -32
  41. package/src/components/Modal/Modal.stories.tsx +105 -105
  42. package/src/components/MoreMenu/MoreMenu.tsx +93 -93
  43. package/src/components/MultiSelect/MultiSelect.stories.tsx +46 -46
  44. package/src/components/MultiSelect/MultiSelect.tsx +106 -106
  45. package/src/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.tsx +53 -53
  46. package/src/components/Notification/Notification.stories.tsx +55 -55
  47. package/src/components/Notification/Notification.styles.ts +57 -57
  48. package/src/components/Notification/Notification.tsx +77 -77
  49. package/src/components/Notification/types.ts +1 -1
  50. package/src/components/NumberInput/NumberInput.tsx +137 -137
  51. package/src/components/NumberInput/index.ts +1 -1
  52. package/src/components/PhoneInput/PhoneInput.tsx +214 -214
  53. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +155 -155
  54. package/src/components/PhoneInput/types.ts +16 -16
  55. package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
  56. package/src/components/RadioButton/RadioButton.tsx +57 -57
  57. package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
  58. package/src/components/Select/constants.ts +2 -2
  59. package/src/components/Select/types.ts +1 -1
  60. package/src/components/Selector/Selector.stories.tsx +62 -62
  61. package/src/components/Selector/Selector.tsx +115 -115
  62. package/src/components/Selector/index.ts +2 -2
  63. package/src/components/Selector/types.ts +12 -12
  64. package/src/components/Skeleton/Skeleton.stories.tsx +19 -19
  65. package/src/components/SmartInput/SmartInput.stories.tsx +52 -52
  66. package/src/components/SmartInput/SmartInput.tsx +116 -116
  67. package/src/components/SmartInput/constants.ts +91 -91
  68. package/src/components/SmartInput/helpers.ts +26 -26
  69. package/src/components/SmartInput/types.ts +18 -18
  70. package/src/components/Status/Status.stories.tsx +73 -73
  71. package/src/components/Status/Status.styles.ts +143 -143
  72. package/src/components/Status/Status.tsx +49 -49
  73. package/src/components/Status/constants.ts +11 -11
  74. package/src/components/Status/index.ts +3 -3
  75. package/src/components/Status/types.ts +5 -5
  76. package/src/components/Switch/Switch.stories.tsx +40 -40
  77. package/src/components/Switch/Switch.tsx +75 -75
  78. package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
  79. package/src/components/TextWithInfo/TextWithInfo.tsx +62 -62
  80. package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
  81. package/src/components/TextWithTooltip/TextWithTooltip.tsx +156 -156
  82. package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
  83. package/src/components/ThemedPreloader/ThemedPreloader.tsx +54 -54
  84. package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
  85. package/src/components/Toaster/Toaster.stories.tsx +30 -30
  86. package/src/components/Tooltip/Tooltip.stories.tsx +19 -19
  87. package/src/components/Tooltip/Tooltip.tsx +35 -35
  88. package/src/components/Tooltip/types.ts +1 -1
  89. package/src/components/WithPopup/WithPopup.styles.ts +45 -45
  90. package/src/components/WithPopup/WithPopup.tsx +184 -184
  91. package/src/components/WithTooltip/WithTooltip.stories.tsx +56 -56
  92. package/src/components/WithTooltip/WithTooltip.styles.ts +7 -7
  93. package/src/components/WithTooltip/WithTooltip.tsx +67 -67
  94. package/src/components/WithTooltip/index.ts +2 -2
  95. package/src/components/index.ts +46 -46
  96. package/src/helpers/popper-helpers.ts +17 -17
  97. package/src/hooks/use-dropdown.ts +84 -84
  98. package/src/hooks/use-is-mounted.ts +15 -15
  99. package/src/theme/helpers.ts +76 -76
  100. package/src/theme/types.ts +158 -158
  101. package/src/vite-env.d.ts +1 -1
@@ -6655,63 +6655,63 @@
6655
6655
  return trueReactPlatformHelpers.mergeRefs(refs);
6656
6656
  }, refs);
6657
6657
  };
6658
- const avatarGreen = ` <svg
6659
- width="100%"
6660
- height="100%"
6661
- viewBox="0 0 32 32"
6662
- fill="none"
6663
- xmlns="http://www.w3.org/2000/svg"
6664
- >
6665
- <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
6666
- <mask
6667
- id="mask0_0_12744"
6668
- style="mask-type: 'alpha';"
6669
- maskUnits="userSpaceOnUse"
6670
- x="0"
6671
- y="0"
6672
- width="32"
6673
- height="32"
6674
- >
6675
- <circle cx="16" cy="16" r="16" fill="white" />
6676
- </mask>
6677
- <g mask="url(#mask0_0_12744)">
6678
- <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
6679
- <mask
6680
- id="mask1_0_12744"
6681
- style="mask-type: 'alpha';"
6682
- maskUnits="userSpaceOnUse"
6683
- x="3"
6684
- y="16"
6685
- width="26"
6686
- height="26"
6687
- >
6688
- <circle cx="16" cy="29" r="13" fill="white" />
6689
- </mask>
6690
- <g mask="url(#mask1_0_12744)">
6691
- <ellipse
6692
- cx="16"
6693
- cy="17.5"
6694
- rx="6"
6695
- ry="7.5"
6696
- fill="#505F79"
6697
- fill-opacity="0.204983"
6698
- />
6699
- </g>
6700
- </g>
6701
- <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
6702
- <defs>
6703
- <linearGradient
6704
- id="paint0_linear_0_12744"
6705
- x1="13.347"
6706
- y1="46.279"
6707
- x2="33.5318"
6708
- y2="30.8088"
6709
- gradientUnits="userSpaceOnUse"
6710
- >
6711
- <stop stop-color="#ABD229" />
6712
- <stop offset="1" stop-color="#9CD03F" />
6713
- </linearGradient>
6714
- </defs>
6658
+ const avatarGreen = ` <svg\r
6659
+ width="100%"\r
6660
+ height="100%"\r
6661
+ viewBox="0 0 32 32"\r
6662
+ fill="none"\r
6663
+ xmlns="http://www.w3.org/2000/svg"\r
6664
+ >\r
6665
+ <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
6666
+ <mask\r
6667
+ id="mask0_0_12744"\r
6668
+ style="mask-type: 'alpha';"\r
6669
+ maskUnits="userSpaceOnUse"\r
6670
+ x="0"\r
6671
+ y="0"\r
6672
+ width="32"\r
6673
+ height="32"\r
6674
+ >\r
6675
+ <circle cx="16" cy="16" r="16" fill="white" />\r
6676
+ </mask>\r
6677
+ <g mask="url(#mask0_0_12744)">\r
6678
+ <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
6679
+ <mask\r
6680
+ id="mask1_0_12744"\r
6681
+ style="mask-type: 'alpha';"\r
6682
+ maskUnits="userSpaceOnUse"\r
6683
+ x="3"\r
6684
+ y="16"\r
6685
+ width="26"\r
6686
+ height="26"\r
6687
+ >\r
6688
+ <circle cx="16" cy="29" r="13" fill="white" />\r
6689
+ </mask>\r
6690
+ <g mask="url(#mask1_0_12744)">\r
6691
+ <ellipse\r
6692
+ cx="16"\r
6693
+ cy="17.5"\r
6694
+ rx="6"\r
6695
+ ry="7.5"\r
6696
+ fill="#505F79"\r
6697
+ fill-opacity="0.204983"\r
6698
+ />\r
6699
+ </g>\r
6700
+ </g>\r
6701
+ <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
6702
+ <defs>\r
6703
+ <linearGradient\r
6704
+ id="paint0_linear_0_12744"\r
6705
+ x1="13.347"\r
6706
+ y1="46.279"\r
6707
+ x2="33.5318"\r
6708
+ y2="30.8088"\r
6709
+ gradientUnits="userSpaceOnUse"\r
6710
+ >\r
6711
+ <stop stop-color="#ABD229" />\r
6712
+ <stop offset="1" stop-color="#9CD03F" />\r
6713
+ </linearGradient>\r
6714
+ </defs>\r
6715
6715
  </svg>`;
6716
6716
  const fileExcel = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\r\n <rect width="20" height="20" rx="4" fill="#21A366"/>\r\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16081)" style="mix-blend-mode:overlay"/>\r\n <path d="M8.00342 14.5244L10.0728 11.3062L12.1357 14.5244H14.4019L11.2217 9.73828L14.1162 5.21875H11.939L10.1108 8.2085L8.24463 5.21875H6.04834L8.93018 9.66846L5.75 14.5244H8.00342Z" fill="white"/>\r\n <defs>\r\n <linearGradient id="paint0_linear_0_16081" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\r\n <stop stop-color="white" stop-opacity="0.245559"/>\r\n <stop offset="1" stop-opacity="0.498578"/>\r\n </linearGradient>\r\n </defs>\r\n</svg>';
6717
6717
  const fileImage = '<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 20 20" fill="none">\r\n <rect width="20" height="20" rx="4" fill="#FF991F"/>\r\n <rect width="20" height="20" rx="4" fill="url(#paint0_linear_0_16103)" style="mix-blend-mode:overlay"/>\r\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.90113 15C3.09595 15 2.62093 14.097 3.07709 13.4335L6.67606 8.19861C7.07341 7.62064 7.9268 7.62065 8.32414 8.19861L13.0001 15H3.90113Z" fill="white"/>\r\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.53962 15L12.7076 10.2481C13.1034 9.65434 13.9758 9.65434 14.3717 10.2481L16.5031 13.4453C16.9462 14.1099 16.4698 15 15.6711 15H9.53962Z" fill="white"/>\r\n <path d="M16.0001 5.5C16.0001 6.32843 15.3285 7 14.5001 7C13.6717 7 13.0001 6.32843 13.0001 5.5C13.0001 4.67157 13.6717 4 14.5001 4C15.3285 4 16.0001 4.67157 16.0001 5.5Z" fill="white"/>\r\n <defs>\r\n <linearGradient id="paint0_linear_0_16103" x1="-9.95187" y1="9.95187" x2="9.95187" y2="29.8556" gradientUnits="userSpaceOnUse">\r\n <stop stop-color="white" stop-opacity="0.245559"/>\r\n <stop offset="1" stop-opacity="0.498578"/>\r\n </linearGradient>\r\n </defs>\r\n</svg>';
@@ -19219,6 +19219,8 @@
19219
19219
  marginRight: 4,
19220
19220
  flexShrink: 0
19221
19221
  },
19222
+ chevronIcon: {},
19223
+ clearIcon: {},
19222
19224
  open: {
19223
19225
  transform: "rotate(180deg)"
19224
19226
  },
@@ -19336,7 +19338,13 @@
19336
19338
  onChange(!value);
19337
19339
  }
19338
19340
  };
19341
+ var handleClearIconClick = function(event) {
19342
+ event.stopPropagation();
19343
+ onChange(void 0);
19344
+ };
19339
19345
  var hasValue = isContentNotEmpty(value);
19346
+ var _filter_isClearable;
19347
+ var hasClearIcon = ((_filter_isClearable = filter.isClearable) !== null && _filter_isClearable !== void 0 ? _filter_isClearable : false) && hasValue;
19340
19348
  return /* @__PURE__ */ jsx(WithPopup, {
19341
19349
  placement: "bottom-start",
19342
19350
  canBeFlipped: true,
@@ -19367,11 +19375,18 @@
19367
19375
  tweakStyles: tweakFilterValueViewStyles
19368
19376
  })
19369
19377
  }),
19370
- !isBoolean && /* @__PURE__ */ jsx("div", {
19371
- className: clsx(classes.iconContainer, _define_property$q({}, classes.open, isActive)),
19378
+ !isBoolean && !hasClearIcon && /* @__PURE__ */ jsx("div", {
19379
+ className: clsx(classes.iconContainer, classes.chevronIcon, _define_property$q({}, classes.open, isActive)),
19372
19380
  children: /* @__PURE__ */ jsx(Icon, {
19373
19381
  type: "chevron-down"
19374
19382
  })
19383
+ }),
19384
+ hasClearIcon && /* @__PURE__ */ jsx("div", {
19385
+ className: clsx(classes.iconContainer, classes.clearIcon),
19386
+ onClick: handleClearIconClick,
19387
+ children: /* @__PURE__ */ jsx(Icon, {
19388
+ type: "close-large"
19389
+ })
19375
19390
  })
19376
19391
  ]
19377
19392
  })