@redsift/table 10.3.0-muiv5-alpha.2 → 10.3.0-muiv5-alpha.3
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.
- package/index.js +13 -6
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -21686,20 +21686,23 @@ const TooltipTrigger = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
21686
21686
|
getReferenceProps,
|
|
21687
21687
|
refs,
|
|
21688
21688
|
tooltipId,
|
|
21689
|
-
triggerClassName
|
|
21689
|
+
triggerClassName,
|
|
21690
|
+
color
|
|
21690
21691
|
} = useTooltipContext();
|
|
21691
21692
|
const childrenRef = children.ref;
|
|
21692
21693
|
const triggerRef = useMergeRefs([refs.setReference, ref, childrenRef]);
|
|
21693
21694
|
if ( /*#__PURE__*/React__default.isValidElement(children)) {
|
|
21694
21695
|
var _children$props$child;
|
|
21695
|
-
return /*#__PURE__*/React__default.cloneElement(children, _objectSpread2({}, getReferenceProps(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
21696
|
+
return /*#__PURE__*/React__default.cloneElement(children, _objectSpread2(_objectSpread2({}, getReferenceProps(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
21696
21697
|
ref: triggerRef
|
|
21697
21698
|
}, props), {}, {
|
|
21698
21699
|
'aria-describedby': tooltipId
|
|
21699
21700
|
}, children.props), {}, {
|
|
21700
|
-
children: (_children$props$child = children.props.children) !== null && _children$props$child !== void 0 ? _children$props$child : ''
|
|
21701
|
-
|
|
21702
|
-
|
|
21701
|
+
children: (_children$props$child = children.props.children) !== null && _children$props$child !== void 0 ? _children$props$child : ''
|
|
21702
|
+
}))), {}, {
|
|
21703
|
+
className: classNames(children.props.className, triggerClassName),
|
|
21704
|
+
color: color !== null && color !== void 0 ? color : children.props.color
|
|
21705
|
+
}));
|
|
21703
21706
|
}
|
|
21704
21707
|
return /*#__PURE__*/React__default.createElement("span", _extends$2({
|
|
21705
21708
|
ref: triggerRef
|
|
@@ -21711,6 +21714,7 @@ TooltipTrigger.displayName = COMPONENT_NAME$4;
|
|
|
21711
21714
|
|
|
21712
21715
|
function useTooltip(_ref) {
|
|
21713
21716
|
let {
|
|
21717
|
+
color,
|
|
21714
21718
|
defaultOpen,
|
|
21715
21719
|
delay,
|
|
21716
21720
|
placement,
|
|
@@ -21763,13 +21767,14 @@ function useTooltip(_ref) {
|
|
|
21763
21767
|
});
|
|
21764
21768
|
const interactions = useInteractions([hover, focus, dismiss, role]);
|
|
21765
21769
|
return React__default.useMemo(() => _objectSpread2(_objectSpread2(_objectSpread2({
|
|
21770
|
+
color,
|
|
21766
21771
|
isOpen,
|
|
21767
21772
|
handleOpen
|
|
21768
21773
|
}, interactions), data), {}, {
|
|
21769
21774
|
arrowRef,
|
|
21770
21775
|
tooltipId,
|
|
21771
21776
|
triggerClassName
|
|
21772
|
-
}), [isOpen, handleOpen, interactions, data, arrowRef, tooltipId, triggerClassName]);
|
|
21777
|
+
}), [color, isOpen, handleOpen, interactions, data, arrowRef, tooltipId, triggerClassName]);
|
|
21773
21778
|
}
|
|
21774
21779
|
|
|
21775
21780
|
const ThemeContext = /*#__PURE__*/React__default.createContext(null);
|
|
@@ -21787,6 +21792,7 @@ const DEFAULT_PROPS$2 = {
|
|
|
21787
21792
|
*/
|
|
21788
21793
|
const BaseTooltip = props => {
|
|
21789
21794
|
const {
|
|
21795
|
+
color,
|
|
21790
21796
|
children,
|
|
21791
21797
|
defaultOpen,
|
|
21792
21798
|
delay,
|
|
@@ -21799,6 +21805,7 @@ const BaseTooltip = props => {
|
|
|
21799
21805
|
} = props;
|
|
21800
21806
|
const theme = useTheme$4 ? useTheme$4(propsTheme) : undefined;
|
|
21801
21807
|
const tooltip = useTooltip({
|
|
21808
|
+
color,
|
|
21802
21809
|
defaultOpen,
|
|
21803
21810
|
delay,
|
|
21804
21811
|
placement,
|