@true-engineering/true-react-common-ui-kit 3.17.0 → 3.18.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.
@@ -1068,6 +1068,7 @@
1068
1068
  }
1069
1069
  }
1070
1070
  };
1071
+ var SLIDE_UP_ANIMATION_DURATION = 150;
1071
1072
  var SLIDE_UP_POSITION_START = 15;
1072
1073
  var SLIDE_UP_POSITION_END = 0;
1073
1074
  var animations = {
@@ -1081,7 +1082,7 @@
1081
1082
  "slide-up-enter-active": {
1082
1083
  opacity: 1,
1083
1084
  transform: "translateY(".concat(SLIDE_UP_POSITION_END, "px)"),
1084
- transition: "150ms ease-in-out",
1085
+ transition: "".concat(SLIDE_UP_ANIMATION_DURATION, "ms ease-in-out"),
1085
1086
  transitionProperty: "opacity, transform"
1086
1087
  },
1087
1088
  "slide-up-exit-active": {
@@ -1091,7 +1092,7 @@
1091
1092
  "slide-up-exit": {
1092
1093
  opacity: 0,
1093
1094
  transform: "translateY(".concat(SLIDE_UP_POSITION_START, "px)"),
1094
- transition: "150ms ease-in-out",
1095
+ transition: "".concat(SLIDE_UP_ANIMATION_DURATION, "ms ease-in-out"),
1095
1096
  transitionProperty: "opacity, transform"
1096
1097
  }
1097
1098
  }
@@ -17634,6 +17635,21 @@
17634
17635
  },
17635
17636
  popup: {
17636
17637
  zIndex: 5
17638
+ },
17639
+ animationEnd: {},
17640
+ animationStart: {},
17641
+ "dropdown-initial": {
17642
+ extend: "animationEnd"
17643
+ },
17644
+ "dropdown-open": {
17645
+ extend: "animationStart"
17646
+ },
17647
+ "dropdown-close": {
17648
+ visibility: "hidden",
17649
+ extend: "animationEnd"
17650
+ },
17651
+ "dropdown-unmounted": {
17652
+ extend: "animationEnd"
17637
17653
  }
17638
17654
  });
17639
17655
  function _array_like_to_array$a(arr, len) {
@@ -17789,7 +17805,10 @@
17789
17805
  }), refs = _useFloating.refs, floatingStyles = _useFloating.floatingStyles, context = _useFloating.context;
17790
17806
  var hover = react.useHover(context, {
17791
17807
  enabled: eventType === "hover",
17792
- delay: hoverDelay
17808
+ delay: typeof hoverDelay === "number" ? {
17809
+ open: hoverDelay,
17810
+ close: 0
17811
+ } : hoverDelay
17793
17812
  });
17794
17813
  var click = react.useClick(context, {
17795
17814
  enabled: eventType === "click",
@@ -17804,7 +17823,11 @@
17804
17823
  click,
17805
17824
  dismiss
17806
17825
  ]).getFloatingProps;
17807
- var _useTransitionStatus = react.useTransitionStatus(context), isMounted = _useTransitionStatus.isMounted, status = _useTransitionStatus.status;
17826
+ var _useTransitionStatus = react.useTransitionStatus(context, {
17827
+ duration: {
17828
+ close: 500
17829
+ }
17830
+ }), isMounted = _useTransitionStatus.isMounted, status = _useTransitionStatus.status;
17808
17831
  return /* @__PURE__ */ jsxs("div", _object_spread_props$q(_object_spread$r({
17809
17832
  ref: refs.setReference,
17810
17833
  className: clsx(classes.root, _define_property$s({}, classes.disabled, isDisabled))
@@ -17827,10 +17850,12 @@
17827
17850
  className: classes.popup,
17828
17851
  ref: refs.setFloating
17829
17852
  }, getFloatingProps()), {
17830
- children: trueReactPlatformHelpers.isFunction(children) ? children({
17831
- status,
17832
- onClose: handleClose
17833
- }) : children
17853
+ children: /* @__PURE__ */ jsx("div", {
17854
+ className: classes["dropdown-".concat(status)],
17855
+ children: trueReactPlatformHelpers.isFunction(children) ? children({
17856
+ onClose: handleClose
17857
+ }) : children
17858
+ })
17834
17859
  }))
17835
17860
  })
17836
17861
  ]
@@ -17937,20 +17962,6 @@
17937
17962
  fontWeight: "bold",
17938
17963
  display: "flex",
17939
17964
  minWidth: 0
17940
- },
17941
- animationEnd: animations.slideUp["slide-up-exit"],
17942
- animationStart: animations.slideUp["slide-up-enter-active"],
17943
- "dropdown-initial": {
17944
- extend: "animationEnd"
17945
- },
17946
- "dropdown-open": {
17947
- extend: "animationStart"
17948
- },
17949
- "dropdown-close": {
17950
- extend: "animationEnd"
17951
- },
17952
- "dropdown-unmounted": {
17953
- extend: "animationEnd"
17954
17965
  }
17955
17966
  });
17956
17967
  function _define_property$r(obj, key, value) {
@@ -18010,6 +18021,11 @@
18010
18021
  var classes = useStyles$p({
18011
18022
  theme: tweakStyles
18012
18023
  });
18024
+ var tweakWithPopupStyles = useTweakStyles({
18025
+ tweakStyles,
18026
+ className: "tweakWithPopup",
18027
+ currentComponentName: "FilterWrapper"
18028
+ });
18013
18029
  var tweakFilterValueViewStyles = useTweakStyles({
18014
18030
  tweakStyles,
18015
18031
  className: "tweakValueView",
@@ -18036,6 +18052,7 @@
18036
18052
  placement: "bottom-start",
18037
18053
  canBeFlipped: true,
18038
18054
  isDisabled: isBoolean || isDisabled,
18055
+ tweakStyles: tweakWithPopupStyles,
18039
18056
  trigger: function(param2) {
18040
18057
  var isActive = param2.isActive;
18041
18058
  var _obj;
@@ -18072,18 +18089,15 @@
18072
18089
  }));
18073
18090
  },
18074
18091
  children: function(param2) {
18075
- var onClose = param2.onClose, status = param2.status;
18076
- return /* @__PURE__ */ jsx("div", {
18077
- className: classes["dropdown-".concat(status)],
18078
- children: /* @__PURE__ */ jsx(Filter, {
18079
- value,
18080
- filter,
18081
- localeKey,
18082
- locale: locale2,
18083
- onClose,
18084
- onChange,
18085
- testId
18086
- })
18092
+ var onClose = param2.onClose;
18093
+ return /* @__PURE__ */ jsx(Filter, {
18094
+ value,
18095
+ filter,
18096
+ localeKey,
18097
+ locale: locale2,
18098
+ onClose,
18099
+ onChange,
18100
+ testId
18087
18101
  });
18088
18102
  }
18089
18103
  });
@@ -25219,7 +25233,7 @@
25219
25233
  var TitleComponent = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleComponent;
25220
25234
  var _itemConfig_titleAlign, _itemConfig_title;
25221
25235
  var _obj;
25222
- return /* @__PURE__ */ jsx(TableHeader, {
25236
+ return /* @__PURE__ */ jsx(TableHeader, _object_spread_props$k(_object_spread$l({
25223
25237
  className: clsx(classes.header, (_obj = {}, _define_property$m(_obj, classes.headerSticky, isFirstColumnSticky && i === 0), _define_property$m(_obj, classes.headerSecond, isFirstColumnSticky && i === 1), _obj)),
25224
25238
  style: {
25225
25239
  minWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.minWidth,
@@ -25227,13 +25241,16 @@
25227
25241
  maxWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.maxWidth,
25228
25242
  textAlign: (_itemConfig_titleAlign = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleAlign) !== null && _itemConfig_titleAlign !== void 0 ? _itemConfig_titleAlign : "left"
25229
25243
  },
25230
- onClick: function() {
25231
- return onHeadClick === null || onHeadClick === void 0 ? void 0 : onHeadClick(key);
25232
- },
25244
+ onClick: trueReactPlatformHelpers.isNotEmpty(onHeadClick) ? function() {
25245
+ return onHeadClick(key);
25246
+ } : void 0
25247
+ }, addDataAttributes({
25248
+ id: (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.shouldRenderDataId) ? key : void 0
25249
+ })), {
25233
25250
  children: trueReactPlatformHelpers.isNotEmpty(TitleComponent) ? /* @__PURE__ */ jsx(TitleComponent, {
25234
25251
  value: headerContent === null || headerContent === void 0 ? void 0 : headerContent[key]
25235
25252
  }) : (_itemConfig_title = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : ""
25236
- }, key);
25253
+ }), key);
25237
25254
  })
25238
25255
  })
25239
25256
  }),
@@ -30377,6 +30394,7 @@
30377
30394
  exports2.NumberInput = NumberInput;
30378
30395
  exports2.PhoneInput = PhoneInput;
30379
30396
  exports2.RadioButton = RadioButton;
30397
+ exports2.SLIDE_UP_ANIMATION_DURATION = SLIDE_UP_ANIMATION_DURATION;
30380
30398
  exports2.ScrollIntoViewIfNeeded = ScrollIntoViewIfNeeded;
30381
30399
  exports2.SearchInput = SearchInput;
30382
30400
  exports2.Select = Select;