@luminati-io/uikit 3.8.1 → 3.8.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -28567,7 +28567,11 @@ var Badge = function Badge(props) {
|
|
28567
28567
|
shape = props.shape,
|
28568
28568
|
variant = props.variant,
|
28569
28569
|
icon = props.icon,
|
28570
|
-
iconPlacement = props.iconPlacement
|
28570
|
+
iconPlacement = props.iconPlacement,
|
28571
|
+
onClick = props.onClick;
|
28572
|
+
var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
28573
|
+
onClick === null || onClick === void 0 || onClick();
|
28574
|
+
}, [onClick]);
|
28571
28575
|
var bgColor = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
28572
28576
|
return {
|
28573
28577
|
"default": _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.gray_3,
|
@@ -28594,7 +28598,8 @@ var Badge = function Badge(props) {
|
|
28594
28598
|
}, icon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
|
28595
28599
|
name: icon,
|
28596
28600
|
size: "xxs",
|
28597
|
-
color: color
|
28601
|
+
color: color,
|
28602
|
+
onClick: handleClick
|
28598
28603
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Label, {
|
28599
28604
|
variant: "xs",
|
28600
28605
|
color: color
|
@@ -44788,7 +44793,8 @@ var Tooltip = function Tooltip(props) {
|
|
44788
44793
|
noWrap = props.noWrap,
|
44789
44794
|
interactive = props.interactive,
|
44790
44795
|
trigger = props.trigger,
|
44791
|
-
className = props.className
|
44796
|
+
className = props.className,
|
44797
|
+
variant = props.variant;
|
44792
44798
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null),
|
44793
44799
|
_useState2 = _slicedToArray(_useState, 2),
|
44794
44800
|
referenceElement = _useState2[0],
|
@@ -44854,10 +44860,11 @@ var Tooltip = function Tooltip(props) {
|
|
44854
44860
|
var tooltipNode = visible ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledTooltipBody, _extends({
|
44855
44861
|
ref: setPopperElement,
|
44856
44862
|
role: "tooltip",
|
44863
|
+
$variant: variant,
|
44857
44864
|
style: styles.popper
|
44858
44865
|
}, attributes.popper, interactive ? triggerProps : {}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
|
44859
44866
|
variant: "sm",
|
44860
|
-
color:
|
44867
|
+
color: variant == 'white' ? 'black' : 'white'
|
44861
44868
|
}, tooltip), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledTooltipArrow, _extends({
|
44862
44869
|
ref: setArrowElement,
|
44863
44870
|
style: styles.arrow
|
@@ -44875,14 +44882,16 @@ var Tooltip = function Tooltip(props) {
|
|
44875
44882
|
};
|
44876
44883
|
Tooltip.defaultProps = {
|
44877
44884
|
placement: 'top',
|
44878
|
-
trigger: 'hover'
|
44885
|
+
trigger: 'hover',
|
44886
|
+
variant: 'black'
|
44879
44887
|
};
|
44880
44888
|
Tooltip.propTypes = {
|
44881
44889
|
tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
|
44882
44890
|
placement: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_util__WEBPACK_IMPORTED_MODULE_5__.tooltipPlacement),
|
44883
44891
|
noWrap: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
44884
44892
|
interactive: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
44885
|
-
trigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['hover', 'focus'])
|
44893
|
+
trigger: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['hover', 'focus']),
|
44894
|
+
variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['black', 'white'])
|
44886
44895
|
};
|
44887
44896
|
var withTooltip = function withTooltip(Comp, tooltipProps) {
|
44888
44897
|
return function WithTooltip(props) {
|
@@ -44892,7 +44901,9 @@ var withTooltip = function withTooltip(Comp, tooltipProps) {
|
|
44892
44901
|
var StyledTooltipBody = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
44893
44902
|
displayName: "StyledTooltipBody",
|
44894
44903
|
componentId: "sc-146jrck-0"
|
44895
|
-
})(["background-color:", ";padding:", ";width:fit-content;max-width:500px;border-radius:", ";transition:opacity 200ms;z-index:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing['03'], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing['02'], _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.tooltip)
|
44904
|
+
})(["background-color:", ";padding:", ";width:fit-content;max-width:500px;border-radius:", ";transition:opacity 200ms;z-index:", ";", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing['03'], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].spacing['02'], _constants__WEBPACK_IMPORTED_MODULE_6__.Z_INDEX.tooltip, function (props) {
|
44905
|
+
return props.$variant == 'white' && (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["background-color:", ";border:1px solid ", ";box-shadow:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.white, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_4, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].box_shadow['md']);
|
44906
|
+
});
|
44896
44907
|
var StyledTooltipArrow = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
44897
44908
|
displayName: "StyledTooltipArrow",
|
44898
44909
|
componentId: "sc-146jrck-1"
|