@doist/reactist 28.5.4 → 28.7.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.
@@ -621,7 +621,7 @@ function TooltipProvider({
621
621
  }, children);
622
622
  }
623
623
 
624
- function Tooltip({
624
+ const Tooltip = /*#__PURE__*/React__namespace.forwardRef(({
625
625
  children,
626
626
  content,
627
627
  position = 'top',
@@ -630,7 +630,7 @@ function Tooltip({
630
630
  showTimeout,
631
631
  hideTimeout,
632
632
  exceptionallySetClassName
633
- }) {
633
+ }, ref) => {
634
634
  const {
635
635
  showTimeout: globalShowTimeout,
636
636
  hideTimeout: globalHideTimeout
@@ -640,6 +640,7 @@ function Tooltip({
640
640
  showTimeout: showTimeout != null ? showTimeout : globalShowTimeout,
641
641
  hideTimeout: hideTimeout != null ? hideTimeout : globalHideTimeout
642
642
  });
643
+ React__namespace.useImperativeHandle(ref, () => tooltip, [tooltip]);
643
644
  const isOpen = tooltip.useState('open');
644
645
  const child = React__namespace.Children.only(children);
645
646
 
@@ -670,7 +671,8 @@ function Tooltip({
670
671
  textAlign: "center"
671
672
  })
672
673
  }, withArrow ? /*#__PURE__*/React__namespace.createElement(react.TooltipArrow, null) : null, typeof content === 'function' ? content() : content) : null);
673
- }
674
+ });
675
+ Tooltip.displayName = 'Tooltip';
674
676
 
675
677
  var modules_5357ebb8 = {"baseButton":"_3930afa0","label":"_90654824","shape-rounded":"c05d17c2","size-small":"_1e29d236","size-normal":"_7246d092","size-large":"_2d084671","disabled":"_2b0b9d95","iconButton":"abd5766f","startIcon":"_380e7c73","endIcon":"_20fe4105","variant-primary":"_7ea1378e","variant-secondary":"_64ee8afd","variant-tertiary":"_650176bf","variant-quaternary":"aa19cb97","tone-destructive":"_7a2d9a8c"};
676
678
 
@@ -926,6 +928,14 @@ const _excluded$n = ["id", "type", "title", "description", "action", "icon", "im
926
928
  _excluded2$5 = ["label"],
927
929
  _excluded3$2 = ["type", "label"],
928
930
  _excluded4$2 = ["type", "label", "variant"];
931
+ /**
932
+ * Type guard to check if the action is an Action object (button or link)
933
+ */
934
+
935
+ function isActionObject$1(action) {
936
+ return typeof action === 'object' && action !== null && 'type' in action && (action.type === 'button' || action.type === 'link');
937
+ }
938
+
929
939
  const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, ref) {
930
940
  let {
931
941
  id,
@@ -1004,7 +1014,7 @@ const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, re
1004
1014
  className: modules_afa80466.actions,
1005
1015
  display: "flex",
1006
1016
  gap: "small"
1007
- }, (action == null ? void 0 : action.type) === 'button' ? /*#__PURE__*/React__namespace.createElement(ActionButton, _objectSpread2({}, action)) : null, (action == null ? void 0 : action.type) === 'link' ? /*#__PURE__*/React__namespace.createElement(ActionLink, _objectSpread2({}, action)) : null, closeButton) : null));
1017
+ }, action ? isActionObject$1(action) ? action.type === 'button' ? /*#__PURE__*/React__namespace.createElement(ActionButton, _objectSpread2({}, action)) : /*#__PURE__*/React__namespace.createElement(ActionLink, _objectSpread2({}, action)) : action : null, closeButton) : null));
1008
1018
  });
1009
1019
 
1010
1020
  function ActionButton(_ref3) {