@true-engineering/true-react-common-ui-kit 3.25.1 → 3.26.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 (93) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +11 -0
  3. package/dist/components/Button/Button.d.ts +2 -2
  4. package/dist/components/WithPopup/WithPopup.d.ts +13 -14
  5. package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
  6. package/dist/components/WithPopup/types.d.ts +11 -0
  7. package/dist/true-react-common-ui-kit.js +156 -105
  8. package/dist/true-react-common-ui-kit.js.map +1 -1
  9. package/dist/true-react-common-ui-kit.umd.cjs +154 -103
  10. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  11. package/dist/types.d.ts +20 -0
  12. package/package.json +1 -1
  13. package/src/components/AccountInfo/AccountInfo.stories.tsx +32 -32
  14. package/src/components/AccountInfo/AccountInfo.tsx +80 -80
  15. package/src/components/AddButton/AddButton.stories.tsx +21 -21
  16. package/src/components/AddButton/AddButton.tsx +52 -52
  17. package/src/components/Button/Button.tsx +129 -129
  18. package/src/components/Colors/Colors.stories.tsx +7 -7
  19. package/src/components/DateInput/DateInput.tsx +90 -90
  20. package/src/components/DateInput/constants.ts +2 -2
  21. package/src/components/Description/Description.stories.tsx +27 -27
  22. package/src/components/Description/Description.tsx +61 -61
  23. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +166 -166
  24. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +210 -210
  25. package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +177 -177
  26. package/src/components/Flag/Flag.stories.tsx +29 -29
  27. package/src/components/Flag/Flag.tsx +26 -26
  28. package/src/components/Flag/augment.d.ts +1 -1
  29. package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +38 -38
  30. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.ts +25 -25
  31. package/src/components/FlexibleTable/helpers.ts +13 -13
  32. package/src/components/Icon/Icon.stories.tsx +86 -86
  33. package/src/components/Icon/complexIcons/augment.d.ts +1 -1
  34. package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
  35. package/src/components/Icon/complexIcons/index.ts +1 -1
  36. package/src/components/IncrementInput/IncrementInput.tsx +105 -105
  37. package/src/components/Input/Input.tsx +297 -297
  38. package/src/components/Input/types.ts +32 -32
  39. package/src/components/List/List.stories.tsx +70 -70
  40. package/src/components/List/List.tsx +33 -33
  41. package/src/components/List/components/ListItem/ListItem.tsx +57 -57
  42. package/src/components/Modal/Modal.stories.tsx +105 -105
  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/NewMoreMenu/NewMoreMenu.tsx +8 -9
  47. package/src/components/Notification/Notification.stories.tsx +46 -46
  48. package/src/components/Notification/Notification.tsx +69 -69
  49. package/src/components/NumberInput/NumberInput.tsx +137 -137
  50. package/src/components/NumberInput/index.ts +1 -1
  51. package/src/components/PhoneInput/PhoneInput.tsx +214 -214
  52. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +155 -155
  53. package/src/components/PhoneInput/types.ts +16 -16
  54. package/src/components/RadioButton/RadioButton.stories.tsx +46 -46
  55. package/src/components/RadioButton/RadioButton.tsx +57 -57
  56. package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
  57. package/src/components/Select/Select.stories.tsx +235 -235
  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.tsx +134 -134
  66. package/src/components/Status/Status.stories.tsx +73 -73
  67. package/src/components/Status/Status.styles.ts +143 -143
  68. package/src/components/Status/Status.tsx +49 -49
  69. package/src/components/Status/constants.ts +11 -11
  70. package/src/components/Status/index.ts +3 -3
  71. package/src/components/Status/types.ts +5 -5
  72. package/src/components/Switch/Switch.stories.tsx +40 -40
  73. package/src/components/Switch/Switch.tsx +75 -75
  74. package/src/components/TextWithInfo/TextWithInfo.stories.tsx +53 -53
  75. package/src/components/TextWithInfo/TextWithInfo.tsx +62 -62
  76. package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
  77. package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +41 -41
  78. package/src/components/ThemedPreloader/ThemedPreloader.tsx +54 -54
  79. package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
  80. package/src/components/Toaster/Toaster.stories.tsx +30 -30
  81. package/src/components/Tooltip/Tooltip.stories.tsx +19 -19
  82. package/src/components/Tooltip/Tooltip.tsx +35 -35
  83. package/src/components/Tooltip/types.ts +1 -1
  84. package/src/components/WithPopup/WithPopup.stories.tsx +36 -15
  85. package/src/components/WithPopup/WithPopup.styles.ts +6 -8
  86. package/src/components/WithPopup/WithPopup.tsx +64 -35
  87. package/src/components/WithPopup/types.ts +14 -0
  88. package/src/helpers/popper-helpers.ts +17 -17
  89. package/src/hooks/use-dropdown.ts +84 -84
  90. package/src/hooks/use-is-mounted.ts +15 -15
  91. package/src/theme/helpers.ts +76 -76
  92. package/src/types.ts +28 -0
  93. package/src/vite-env.d.ts +1 -1
@@ -6656,63 +6656,63 @@
6656
6656
  return trueReactPlatformHelpers.mergeRefs(refs);
6657
6657
  }, refs);
6658
6658
  };
6659
- const avatarGreen = ` <svg
6660
- width="100%"
6661
- height="100%"
6662
- viewBox="0 0 32 32"
6663
- fill="none"
6664
- xmlns="http://www.w3.org/2000/svg"
6665
- >
6666
- <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />
6667
- <mask
6668
- id="mask0_0_12744"
6669
- style="mask-type: 'alpha';"
6670
- maskUnits="userSpaceOnUse"
6671
- x="0"
6672
- y="0"
6673
- width="32"
6674
- height="32"
6675
- >
6676
- <circle cx="16" cy="16" r="16" fill="white" />
6677
- </mask>
6678
- <g mask="url(#mask0_0_12744)">
6679
- <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />
6680
- <mask
6681
- id="mask1_0_12744"
6682
- style="mask-type: 'alpha';"
6683
- maskUnits="userSpaceOnUse"
6684
- x="3"
6685
- y="16"
6686
- width="26"
6687
- height="26"
6688
- >
6689
- <circle cx="16" cy="29" r="13" fill="white" />
6690
- </mask>
6691
- <g mask="url(#mask1_0_12744)">
6692
- <ellipse
6693
- cx="16"
6694
- cy="17.5"
6695
- rx="6"
6696
- ry="7.5"
6697
- fill="#505F79"
6698
- fill-opacity="0.204983"
6699
- />
6700
- </g>
6701
- </g>
6702
- <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />
6703
- <defs>
6704
- <linearGradient
6705
- id="paint0_linear_0_12744"
6706
- x1="13.347"
6707
- y1="46.279"
6708
- x2="33.5318"
6709
- y2="30.8088"
6710
- gradientUnits="userSpaceOnUse"
6711
- >
6712
- <stop stop-color="#ABD229" />
6713
- <stop offset="1" stop-color="#9CD03F" />
6714
- </linearGradient>
6715
- </defs>
6659
+ const avatarGreen = ` <svg\r
6660
+ width="100%"\r
6661
+ height="100%"\r
6662
+ viewBox="0 0 32 32"\r
6663
+ fill="none"\r
6664
+ xmlns="http://www.w3.org/2000/svg"\r
6665
+ >\r
6666
+ <circle opacity="0.5" cx="16" cy="16" r="16" fill="#DDE3ED" />\r
6667
+ <mask\r
6668
+ id="mask0_0_12744"\r
6669
+ style="mask-type: 'alpha';"\r
6670
+ maskUnits="userSpaceOnUse"\r
6671
+ x="0"\r
6672
+ y="0"\r
6673
+ width="32"\r
6674
+ height="32"\r
6675
+ >\r
6676
+ <circle cx="16" cy="16" r="16" fill="white" />\r
6677
+ </mask>\r
6678
+ <g mask="url(#mask0_0_12744)">\r
6679
+ <circle cx="16" cy="29" r="13" fill="url(#paint0_linear_0_12744)" />\r
6680
+ <mask\r
6681
+ id="mask1_0_12744"\r
6682
+ style="mask-type: 'alpha';"\r
6683
+ maskUnits="userSpaceOnUse"\r
6684
+ x="3"\r
6685
+ y="16"\r
6686
+ width="26"\r
6687
+ height="26"\r
6688
+ >\r
6689
+ <circle cx="16" cy="29" r="13" fill="white" />\r
6690
+ </mask>\r
6691
+ <g mask="url(#mask1_0_12744)">\r
6692
+ <ellipse\r
6693
+ cx="16"\r
6694
+ cy="17.5"\r
6695
+ rx="6"\r
6696
+ ry="7.5"\r
6697
+ fill="#505F79"\r
6698
+ fill-opacity="0.204983"\r
6699
+ />\r
6700
+ </g>\r
6701
+ </g>\r
6702
+ <ellipse cx="16" cy="13" rx="6" ry="7" fill="white" />\r
6703
+ <defs>\r
6704
+ <linearGradient\r
6705
+ id="paint0_linear_0_12744"\r
6706
+ x1="13.347"\r
6707
+ y1="46.279"\r
6708
+ x2="33.5318"\r
6709
+ y2="30.8088"\r
6710
+ gradientUnits="userSpaceOnUse"\r
6711
+ >\r
6712
+ <stop stop-color="#ABD229" />\r
6713
+ <stop offset="1" stop-color="#9CD03F" />\r
6714
+ </linearGradient>\r
6715
+ </defs>\r
6716
6716
  </svg>`;
6717
6717
  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>';
6718
6718
  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>';
@@ -8853,8 +8853,57 @@
8853
8853
  }
8854
8854
  return target;
8855
8855
  }
8856
- var Button = /* @__PURE__ */ React.forwardRef(function(param, ref) {
8857
- var _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, children = param.children, _param_size = param.size, size = _param_size === void 0 ? "l" : _param_size, _param_view = param.view, view = _param_view === void 0 ? "primary" : _param_view, _param_isFullWidth = param.isFullWidth, isFullWidth = _param_isFullWidth === void 0 ? false : _param_isFullWidth, _param_isInline = param.isInline, isInline = _param_isInline === void 0 ? false : _param_isInline, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isActive = param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_shouldSkipTabNavigation = param.shouldSkipTabNavigation, shouldSkipTabNavigation = _param_shouldSkipTabNavigation === void 0 ? false : _param_shouldSkipTabNavigation, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, icon = param.icon, _param_iconPosition = param.iconPosition, iconPosition = _param_iconPosition === void 0 ? "left" : _param_iconPosition, _param_preloaderType = param.preloaderType, preloaderType = _param_preloaderType === void 0 ? "dots" : _param_preloaderType, onClick = param.onClick, onMouseDown = param.onMouseDown;
8856
+ function _object_without_properties$g(source, excluded) {
8857
+ if (source == null)
8858
+ return {};
8859
+ var target = _object_without_properties_loose$g(source, excluded);
8860
+ var key, i;
8861
+ if (Object.getOwnPropertySymbols) {
8862
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
8863
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
8864
+ key = sourceSymbolKeys[i];
8865
+ if (excluded.indexOf(key) >= 0)
8866
+ continue;
8867
+ if (!Object.prototype.propertyIsEnumerable.call(source, key))
8868
+ continue;
8869
+ target[key] = source[key];
8870
+ }
8871
+ }
8872
+ return target;
8873
+ }
8874
+ function _object_without_properties_loose$g(source, excluded) {
8875
+ if (source == null)
8876
+ return {};
8877
+ var target = {};
8878
+ var sourceKeys = Object.keys(source);
8879
+ var key, i;
8880
+ for (i = 0; i < sourceKeys.length; i++) {
8881
+ key = sourceKeys[i];
8882
+ if (excluded.indexOf(key) >= 0)
8883
+ continue;
8884
+ target[key] = source[key];
8885
+ }
8886
+ return target;
8887
+ }
8888
+ var Button = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
8889
+ var _param_type = _param.type, type = _param_type === void 0 ? "button" : _param_type, children = _param.children, _param_size = _param.size, size = _param_size === void 0 ? "l" : _param_size, _param_view = _param.view, view = _param_view === void 0 ? "primary" : _param_view, _param_isFullWidth = _param.isFullWidth, isFullWidth = _param_isFullWidth === void 0 ? false : _param_isFullWidth, _param_isInline = _param.isInline, isInline = _param_isInline === void 0 ? false : _param_isInline, _param_isDisabled = _param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isActive = _param.isActive, isActive = _param_isActive === void 0 ? false : _param_isActive, _param_isLoading = _param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_shouldSkipTabNavigation = _param.shouldSkipTabNavigation, shouldSkipTabNavigation = _param_shouldSkipTabNavigation === void 0 ? false : _param_shouldSkipTabNavigation, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, icon = _param.icon, _param_iconPosition = _param.iconPosition, iconPosition = _param_iconPosition === void 0 ? "left" : _param_iconPosition, _param_preloaderType = _param.preloaderType, preloaderType = _param_preloaderType === void 0 ? "dots" : _param_preloaderType, interactions = _object_without_properties$g(_param, [
8890
+ "type",
8891
+ "children",
8892
+ "size",
8893
+ "view",
8894
+ "isFullWidth",
8895
+ "isInline",
8896
+ "isDisabled",
8897
+ "isActive",
8898
+ "isLoading",
8899
+ "shouldSkipTabNavigation",
8900
+ "data",
8901
+ "testId",
8902
+ "tweakStyles",
8903
+ "icon",
8904
+ "iconPosition",
8905
+ "preloaderType"
8906
+ ]);
8858
8907
  var classes = useStyles$N({
8859
8908
  theme: tweakStyles
8860
8909
  });
@@ -8873,10 +8922,8 @@
8873
8922
  type,
8874
8923
  className: clsx(classes.root, classes[size], classes[view], (_obj2 = {}, _define_property$U(_obj2, classes.disabled, isDisabled), _define_property$U(_obj2, classes.fullWidth, isFullWidth), _define_property$U(_obj2, classes.inline, isInline), _define_property$U(_obj2, classes.active, isActive), _define_property$U(_obj2, classes.loading, isLoading), _define_property$U(_obj2, classes.onlyIcon, hasIcon && !hasChildren), _obj2)),
8875
8924
  tabIndex: shouldSkipTabNavigation ? -1 : void 0,
8876
- disabled: hasNoAction,
8877
- onClick: !hasNoAction ? onClick : void 0,
8878
- onMouseDown: !hasNoAction ? onMouseDown : void 0
8879
- }, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
8925
+ disabled: hasNoAction
8926
+ }, interactions, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
8880
8927
  children: [
8881
8928
  /* @__PURE__ */ jsxs("span", {
8882
8929
  className: clsx(classes.content, (_obj1 = {}, _define_property$U(_obj1, classes.iconFromRight, hasChildren && hasIcon && iconPosition === "right"), _define_property$U(_obj1, classes.iconFromLeft, hasChildren && hasIcon && iconPosition === "left"), _obj1)),
@@ -18838,17 +18885,16 @@
18838
18885
  }
18839
18886
  var DEFAULT_OFFSET = 6;
18840
18887
  var useStyles$n = createThemedStyles("WithPopup", {
18841
- root: {},
18842
- disabled: {
18843
- "& > $trigger": {
18844
- cursor: "default"
18845
- }
18846
- },
18847
18888
  trigger: {
18889
+ width: "fit-content",
18848
18890
  cursor: "pointer"
18849
18891
  },
18892
+ disabled: {
18893
+ cursor: "default"
18894
+ },
18850
18895
  popup: {
18851
- zIndex: 5
18896
+ zIndex: 5,
18897
+ outline: "none"
18852
18898
  },
18853
18899
  animationEnd: {},
18854
18900
  animationStart: {},
@@ -18991,7 +19037,7 @@
18991
19037
  return _array_like_to_array$9(o, minLen);
18992
19038
  }
18993
19039
  var WithPopup = function(param) {
18994
- var trigger = param.trigger, children = param.children, _param_middlewares = param.middlewares, middlewares = _param_middlewares === void 0 ? [] : _param_middlewares, _param_eventType = param.eventType, eventType = _param_eventType === void 0 ? "click" : _param_eventType, _param_placement = param.placement, placement = _param_placement === void 0 ? eventType === "click" ? "bottom-end" : "top" : _param_placement, _param_shouldHideOnScroll = param.shouldHideOnScroll, shouldHideOnScroll = _param_shouldHideOnScroll === void 0 ? false : _param_shouldHideOnScroll, _param_shouldRenderInBody = param.shouldRenderInBody, shouldRenderInBody = _param_shouldRenderInBody === void 0 ? false : _param_shouldRenderInBody, _param_hoverDelay = param.hoverDelay, hoverDelay = _param_hoverDelay === void 0 ? 0 : _param_hoverDelay, _param_popupOffset = param.popupOffset, popupOffset = _param_popupOffset === void 0 ? DEFAULT_OFFSET : _param_popupOffset, _param_canBeFlipped = param.canBeFlipped, canBeFlipped = _param_canBeFlipped === void 0 ? false : _param_canBeFlipped, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, tweakStyles = param.tweakStyles, data = param.data, testId = param.testId, onToggle = param.onToggle;
19040
+ var trigger = param.trigger, children = param.children, _param_middlewares = param.middlewares, middlewares = _param_middlewares === void 0 ? [] : _param_middlewares, _param_eventType = param.eventType, eventType = _param_eventType === void 0 ? "click" : _param_eventType, _param_placement = param.placement, placement = _param_placement === void 0 ? eventType === "click" ? "bottom-end" : "top" : _param_placement, _param_hoverDelay = param.hoverDelay, hoverDelay = _param_hoverDelay === void 0 ? 0 : _param_hoverDelay, _param_popupOffset = param.popupOffset, popupOffset = _param_popupOffset === void 0 ? DEFAULT_OFFSET : _param_popupOffset, _param_shouldHideOnScroll = param.shouldHideOnScroll, shouldHideOnScroll = _param_shouldHideOnScroll === void 0 ? false : _param_shouldHideOnScroll, _param_shouldRenderInBody = param.shouldRenderInBody, shouldRenderInBody = _param_shouldRenderInBody === void 0 ? true : _param_shouldRenderInBody, _param_canBeFlipped = param.canBeFlipped, canBeFlipped = _param_canBeFlipped === void 0 ? true : _param_canBeFlipped, _param_isTriggerWrapped = param.isTriggerWrapped, isTriggerWrapped = _param_isTriggerWrapped === void 0 ? eventType === "hover" : _param_isTriggerWrapped, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, tweakStyles = param.tweakStyles, data = param.data, testId = param.testId, onToggle = param.onToggle;
18995
19041
  var classes = useStyles$n({
18996
19042
  theme: tweakStyles
18997
19043
  });
@@ -18999,12 +19045,12 @@
18999
19045
  var handleToggle = function(isActive, event) {
19000
19046
  event === null || event === void 0 ? void 0 : event.stopPropagation();
19001
19047
  if (!isDisabled) {
19002
- onToggle === null || onToggle === void 0 ? void 0 : onToggle(isActive);
19048
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(isActive, event);
19003
19049
  setIsOpen(isActive);
19004
19050
  }
19005
19051
  };
19006
- var handleClose = function() {
19007
- handleToggle(false);
19052
+ var handleClose = function(event) {
19053
+ handleToggle(false, event);
19008
19054
  };
19009
19055
  var _useFloating = react.useFloating({
19010
19056
  open: isOpen,
@@ -19022,41 +19068,44 @@
19022
19068
  delay: typeof hoverDelay === "number" ? {
19023
19069
  open: hoverDelay,
19024
19070
  close: 0
19025
- } : hoverDelay
19071
+ } : hoverDelay,
19072
+ handleClose: react.safePolygon()
19073
+ });
19074
+ var focus = react.useFocus(context, {
19075
+ enabled: eventType === "hover"
19026
19076
  });
19027
19077
  var click = react.useClick(context, {
19028
- enabled: eventType === "click",
19029
- toggle: false
19078
+ enabled: eventType === "click"
19030
19079
  });
19031
19080
  var dismiss = react.useDismiss(context, {
19032
19081
  enabled: eventType === "click",
19033
19082
  ancestorScroll: shouldHideOnScroll
19034
19083
  });
19035
- var getFloatingProps = react.useInteractions([
19084
+ var _useInteractions = react.useInteractions([
19036
19085
  hover,
19037
19086
  click,
19087
+ focus,
19038
19088
  dismiss
19039
- ]).getFloatingProps;
19089
+ ]), getFloatingProps = _useInteractions.getFloatingProps, getReferenceProps = _useInteractions.getReferenceProps;
19040
19090
  var _useTransitionStatus = react.useTransitionStatus(context, {
19041
19091
  duration: {
19042
19092
  close: 500
19043
19093
  }
19044
19094
  }), isMounted = _useTransitionStatus.isMounted, status = _useTransitionStatus.status;
19045
- return /* @__PURE__ */ jsxs("div", _object_spread_props$n(_object_spread$o({
19046
- ref: refs.setReference,
19047
- className: clsx(classes.root, _define_property$p({}, classes.disabled, isDisabled))
19048
- }, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
19095
+ var referenceProps = getReferenceProps({
19096
+ ref: refs.setReference
19097
+ });
19098
+ var triggerElement = trueReactPlatformHelpers.applyAction(trigger, _object_spread$o({
19099
+ isActive: isOpen,
19100
+ isDisabled
19101
+ }, !isTriggerWrapped ? referenceProps : void 0));
19102
+ return /* @__PURE__ */ jsxs(Fragment, {
19049
19103
  children: [
19050
- /* @__PURE__ */ jsx("div", _object_spread_props$n(_object_spread$o({
19051
- className: classes.trigger,
19052
- onClick: eventType === "click" ? function(e) {
19053
- return handleToggle(!isOpen, e);
19054
- } : void 0
19055
- }, trueReactPlatformHelpers.addDataTestId(testId, "trigger")), {
19056
- children: trueReactPlatformHelpers.isFunction(trigger) ? trigger({
19057
- isActive: isOpen
19058
- }) : trigger
19059
- })),
19104
+ isTriggerWrapped ? /* @__PURE__ */ jsx("div", _object_spread_props$n(_object_spread$o({
19105
+ className: clsx(classes.trigger, _define_property$p({}, classes.disabled, isDisabled))
19106
+ }, referenceProps, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
19107
+ children: triggerElement
19108
+ })) : triggerElement,
19060
19109
  isMounted && /* @__PURE__ */ jsx(react.FloatingPortal, {
19061
19110
  root: !shouldRenderInBody ? refs.reference.current : void 0,
19062
19111
  children: /* @__PURE__ */ jsx("div", _object_spread_props$n(_object_spread$o({
@@ -19073,7 +19122,7 @@
19073
19122
  }))
19074
19123
  })
19075
19124
  ]
19076
- }));
19125
+ });
19077
19126
  };
19078
19127
  var isContentNotEmpty = function(value) {
19079
19128
  if (Array.isArray(value)) {
@@ -30993,7 +31042,7 @@
30993
31042
  return target;
30994
31043
  }
30995
31044
  var NewMoreMenu = function(_param) {
30996
- var items = _param.items, _param_isDisabled = _param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_hasDefaultStateBackground = _param.hasDefaultStateBackground, hasDefaultStateBackground = _param_hasDefaultStateBackground === void 0 ? true : _param_hasDefaultStateBackground, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, props = _object_without_properties(_param, [
31045
+ var items = _param.items, _param_isDisabled = _param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_hasDefaultStateBackground = _param.hasDefaultStateBackground, hasDefaultStateBackground = _param_hasDefaultStateBackground === void 0 ? true : _param_hasDefaultStateBackground, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, rest = _object_without_properties(_param, [
30997
31046
  "items",
30998
31047
  "isDisabled",
30999
31048
  "hasDefaultStateBackground",
@@ -31014,18 +31063,20 @@
31014
31063
  className: "tweakList",
31015
31064
  currentComponentName: "NewMoreMenu"
31016
31065
  });
31017
- var isButtonDisabled = isDisabled || !trueReactPlatformHelpers.isArrayNotEmpty(items);
31018
31066
  return /* @__PURE__ */ jsx(WithPopup, _object_spread_props(_object_spread({
31019
- isDisabled: isButtonDisabled,
31067
+ isDisabled: isDisabled || trueReactPlatformHelpers.isArrayEmpty(items),
31020
31068
  tweakStyles: tweakWithPopupStyles
31021
- }, props), {
31022
- trigger: function(param) {
31023
- var isActive = param.isActive;
31069
+ }, rest), {
31070
+ trigger: function(_param2) {
31071
+ var isActive = _param2.isActive, isTriggerDisabled = _param2.isDisabled, props = _object_without_properties(_param2, [
31072
+ "isActive",
31073
+ "isDisabled"
31074
+ ]);
31024
31075
  var _obj2;
31025
31076
  return /* @__PURE__ */ jsx("button", _object_spread_props(_object_spread({
31026
- className: clsx(classes.button, (_obj2 = {}, _define_property(_obj2, classes.hasCircle, hasDefaultStateBackground), _define_property(_obj2, classes.disabled, isButtonDisabled), _define_property(_obj2, classes.active, isActive), _obj2)),
31027
- disabled: isButtonDisabled
31028
- }, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data)), {
31077
+ className: clsx(classes.button, (_obj2 = {}, _define_property(_obj2, classes.hasCircle, hasDefaultStateBackground), _define_property(_obj2, classes.disabled, isTriggerDisabled), _define_property(_obj2, classes.active, isActive), _obj2)),
31078
+ disabled: isTriggerDisabled
31079
+ }, trueReactPlatformHelpers.addDataTestId(testId), addDataAttributes(data), props), {
31029
31080
  children: /* @__PURE__ */ jsx("div", {
31030
31081
  className: classes.icon,
31031
31082
  children: /* @__PURE__ */ jsx(Icon, {