@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
@@ -6667,63 +6667,63 @@ var useMergedRefs = function(refs) {
6667
6667
  return mergeRefs(refs);
6668
6668
  }, refs);
6669
6669
  };
6670
- const avatarGreen = ` <svg
6671
- width="100%"
6672
- height="100%"
6673
- viewBox="0 0 32 32"
6674
- fill="none"
6675
- xmlns="http://www.w3.org/2000/svg"
6676
- >
6677
- <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
6678
- <mask
6679
- id="mask0_0_12744"
6680
- style="mask-type: 'alpha';"
6681
- maskUnits="userSpaceOnUse"
6682
- x="0"
6683
- y="0"
6684
- width="32"
6685
- height="32"
6686
- >
6687
- <circle cx="16" cy="16" r="16" fill="white" />
6688
- </mask>
6689
- <g mask="url(#mask0_0_12744)">
6690
- <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
6691
- <mask
6692
- id="mask1_0_12744"
6693
- style="mask-type: 'alpha';"
6694
- maskUnits="userSpaceOnUse"
6695
- x="3"
6696
- y="16"
6697
- width="26"
6698
- height="26"
6699
- >
6700
- <circle cx="16" cy="29" r="13" fill="white" />
6701
- </mask>
6702
- <g mask="url(#mask1_0_12744)">
6703
- <ellipse
6704
- cx="16"
6705
- cy="17.5"
6706
- rx="6"
6707
- ry="7.5"
6708
- fill="#505F79"
6709
- fill-opacity="0.204983"
6710
- />
6711
- </g>
6712
- </g>
6713
- <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
6714
- <defs>
6715
- <linearGradient
6716
- id="paint0_linear_0_12744"
6717
- x1="13.347"
6718
- y1="46.279"
6719
- x2="33.5318"
6720
- y2="30.8088"
6721
- gradientUnits="userSpaceOnUse"
6722
- >
6723
- <stop stop-color="#ABD229" />
6724
- <stop offset="1" stop-color="#9CD03F" />
6725
- </linearGradient>
6726
- </defs>
6670
+ const avatarGreen = ` <svg\r
6671
+ width="100%"\r
6672
+ height="100%"\r
6673
+ viewBox="0 0 32 32"\r
6674
+ fill="none"\r
6675
+ xmlns="http://www.w3.org/2000/svg"\r
6676
+ >\r
6677
+ <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
6678
+ <mask\r
6679
+ id="mask0_0_12744"\r
6680
+ style="mask-type: 'alpha';"\r
6681
+ maskUnits="userSpaceOnUse"\r
6682
+ x="0"\r
6683
+ y="0"\r
6684
+ width="32"\r
6685
+ height="32"\r
6686
+ >\r
6687
+ <circle cx="16" cy="16" r="16" fill="white" />\r
6688
+ </mask>\r
6689
+ <g mask="url(#mask0_0_12744)">\r
6690
+ <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
6691
+ <mask\r
6692
+ id="mask1_0_12744"\r
6693
+ style="mask-type: 'alpha';"\r
6694
+ maskUnits="userSpaceOnUse"\r
6695
+ x="3"\r
6696
+ y="16"\r
6697
+ width="26"\r
6698
+ height="26"\r
6699
+ >\r
6700
+ <circle cx="16" cy="29" r="13" fill="white" />\r
6701
+ </mask>\r
6702
+ <g mask="url(#mask1_0_12744)">\r
6703
+ <ellipse\r
6704
+ cx="16"\r
6705
+ cy="17.5"\r
6706
+ rx="6"\r
6707
+ ry="7.5"\r
6708
+ fill="#505F79"\r
6709
+ fill-opacity="0.204983"\r
6710
+ />\r
6711
+ </g>\r
6712
+ </g>\r
6713
+ <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
6714
+ <defs>\r
6715
+ <linearGradient\r
6716
+ id="paint0_linear_0_12744"\r
6717
+ x1="13.347"\r
6718
+ y1="46.279"\r
6719
+ x2="33.5318"\r
6720
+ y2="30.8088"\r
6721
+ gradientUnits="userSpaceOnUse"\r
6722
+ >\r
6723
+ <stop stop-color="#ABD229" />\r
6724
+ <stop offset="1" stop-color="#9CD03F" />\r
6725
+ </linearGradient>\r
6726
+ </defs>\r
6727
6727
  </svg>`;
6728
6728
  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>';
6729
6729
  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>';
@@ -19231,6 +19231,8 @@ var useStyles$m = createThemedStyles("FilterWrapper", {
19231
19231
  marginRight: 4,
19232
19232
  flexShrink: 0
19233
19233
  },
19234
+ chevronIcon: {},
19235
+ clearIcon: {},
19234
19236
  open: {
19235
19237
  transform: "rotate(180deg)"
19236
19238
  },
@@ -19348,7 +19350,13 @@ function FilterWrapper(param) {
19348
19350
  onChange(!value);
19349
19351
  }
19350
19352
  };
19353
+ var handleClearIconClick = function(event) {
19354
+ event.stopPropagation();
19355
+ onChange(void 0);
19356
+ };
19351
19357
  var hasValue = isContentNotEmpty(value);
19358
+ var _filter_isClearable;
19359
+ var hasClearIcon = ((_filter_isClearable = filter.isClearable) !== null && _filter_isClearable !== void 0 ? _filter_isClearable : false) && hasValue;
19352
19360
  return /* @__PURE__ */ jsx(WithPopup, {
19353
19361
  placement: "bottom-start",
19354
19362
  canBeFlipped: true,
@@ -19379,11 +19387,18 @@ function FilterWrapper(param) {
19379
19387
  tweakStyles: tweakFilterValueViewStyles
19380
19388
  })
19381
19389
  }),
19382
- !isBoolean && /* @__PURE__ */ jsx("div", {
19383
- className: clsx(classes.iconContainer, _define_property$q({}, classes.open, isActive)),
19390
+ !isBoolean && !hasClearIcon && /* @__PURE__ */ jsx("div", {
19391
+ className: clsx(classes.iconContainer, classes.chevronIcon, _define_property$q({}, classes.open, isActive)),
19384
19392
  children: /* @__PURE__ */ jsx(Icon, {
19385
19393
  type: "chevron-down"
19386
19394
  })
19395
+ }),
19396
+ hasClearIcon && /* @__PURE__ */ jsx("div", {
19397
+ className: clsx(classes.iconContainer, classes.clearIcon),
19398
+ onClick: handleClearIconClick,
19399
+ children: /* @__PURE__ */ jsx(Icon, {
19400
+ type: "close-large"
19401
+ })
19387
19402
  })
19388
19403
  ]
19389
19404
  })