@deskpro/deskpro-ui 6.10.4 → 7.1.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 (98) hide show
  1. package/dist/cjs/components/Avatar/Avatar.js +11 -2
  2. package/dist/cjs/components/Avatar/Avatar.js.map +1 -1
  3. package/dist/cjs/components/Avatar/AvatarGroup.js +4 -1
  4. package/dist/cjs/components/Avatar/AvatarGroup.js.map +1 -1
  5. package/dist/cjs/components/LabelTag/Tag.js +2 -2
  6. package/dist/cjs/components/LabelTag/Tag.js.map +1 -1
  7. package/dist/cjs/components/LabelTag/TagCircle.js +11 -2
  8. package/dist/cjs/components/LabelTag/TagCircle.js.map +1 -1
  9. package/dist/cjs/components/TabBar/TabBar.js +4 -7
  10. package/dist/cjs/components/TabBar/TabBar.js.map +1 -1
  11. package/dist/cjs/components/TextArea/TextArea.js +33 -31
  12. package/dist/cjs/components/TextArea/TextArea.js.map +1 -1
  13. package/dist/cjs/components/TippyTooltip/EllipsesTippyTooltip.js +18 -0
  14. package/dist/cjs/components/TippyTooltip/EllipsesTippyTooltip.js.map +1 -0
  15. package/dist/cjs/components/TippyTooltip/TippyTooltip.js +121 -0
  16. package/dist/cjs/components/TippyTooltip/TippyTooltip.js.map +1 -0
  17. package/dist/cjs/components/TippyTooltip/index.js +9 -0
  18. package/dist/cjs/components/TippyTooltip/index.js.map +1 -0
  19. package/dist/cjs/components/TippyTooltip/mergePlugins.js.map +1 -0
  20. package/dist/cjs/components/TippyTooltip/plugIns/disableForTouchDevicesPlugin.js.map +1 -0
  21. package/dist/cjs/components/TippyTooltip/plugIns/dpNamePlugin.js.map +1 -0
  22. package/dist/cjs/components/TippyTooltip/plugIns/escPlugin.js.map +1 -0
  23. package/dist/cjs/components/TippyTooltip/plugIns/index.js.map +1 -0
  24. package/dist/cjs/components/Tooltip/EllipsesTooltip.js +2 -3
  25. package/dist/cjs/components/Tooltip/EllipsesTooltip.js.map +1 -1
  26. package/dist/cjs/components/Tooltip/Tooltip.js +144 -101
  27. package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
  28. package/dist/cjs/components/Tooltip/index.js.map +1 -1
  29. package/dist/cjs/components/Tooltip/styles.js +202 -0
  30. package/dist/cjs/components/Tooltip/styles.js.map +1 -0
  31. package/dist/cjs/components/Tooltip/types.js +3 -0
  32. package/dist/cjs/components/Tooltip/types.js.map +1 -0
  33. package/dist/cjs/components/Tooltip/utils.js +247 -0
  34. package/dist/cjs/components/Tooltip/utils.js.map +1 -0
  35. package/dist/cjs/components/index.js +1 -0
  36. package/dist/cjs/components/index.js.map +1 -1
  37. package/dist/cjs/hooks/useOnClickOutside.js +27 -0
  38. package/dist/cjs/hooks/useOnClickOutside.js.map +1 -0
  39. package/dist/deskpro-ui.d.ts +80 -10
  40. package/dist/esm/components/Avatar/Avatar.js +11 -2
  41. package/dist/esm/components/Avatar/Avatar.js.map +1 -1
  42. package/dist/esm/components/Avatar/AvatarGroup.js +4 -1
  43. package/dist/esm/components/Avatar/AvatarGroup.js.map +1 -1
  44. package/dist/esm/components/LabelTag/Tag.js +3 -3
  45. package/dist/esm/components/LabelTag/Tag.js.map +1 -1
  46. package/dist/esm/components/LabelTag/TagCircle.js +11 -2
  47. package/dist/esm/components/LabelTag/TagCircle.js.map +1 -1
  48. package/dist/esm/components/TabBar/TabBar.js +4 -7
  49. package/dist/esm/components/TabBar/TabBar.js.map +1 -1
  50. package/dist/esm/components/TextArea/TextArea.js +33 -31
  51. package/dist/esm/components/TextArea/TextArea.js.map +1 -1
  52. package/dist/esm/components/TippyTooltip/EllipsesTippyTooltip.js +16 -0
  53. package/dist/esm/components/TippyTooltip/EllipsesTippyTooltip.js.map +1 -0
  54. package/dist/esm/components/TippyTooltip/TippyTooltip.js +117 -0
  55. package/dist/esm/components/TippyTooltip/TippyTooltip.js.map +1 -0
  56. package/dist/esm/components/TippyTooltip/index.js +3 -0
  57. package/dist/esm/components/TippyTooltip/index.js.map +1 -0
  58. package/dist/esm/components/TippyTooltip/mergePlugins.js.map +1 -0
  59. package/dist/esm/components/TippyTooltip/plugIns/disableForTouchDevicesPlugin.js.map +1 -0
  60. package/dist/esm/components/TippyTooltip/plugIns/dpNamePlugin.js.map +1 -0
  61. package/dist/esm/components/TippyTooltip/plugIns/escPlugin.js.map +1 -0
  62. package/dist/esm/components/TippyTooltip/plugIns/index.js.map +1 -0
  63. package/dist/esm/components/Tooltip/EllipsesTooltip.js +2 -3
  64. package/dist/esm/components/Tooltip/EllipsesTooltip.js.map +1 -1
  65. package/dist/esm/components/Tooltip/Tooltip.js +143 -101
  66. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  67. package/dist/esm/components/Tooltip/index.js.map +1 -1
  68. package/dist/esm/components/Tooltip/styles.js +198 -0
  69. package/dist/esm/components/Tooltip/styles.js.map +1 -0
  70. package/dist/esm/components/Tooltip/types.js +2 -0
  71. package/dist/esm/components/Tooltip/types.js.map +1 -0
  72. package/dist/esm/components/Tooltip/utils.js +240 -0
  73. package/dist/esm/components/Tooltip/utils.js.map +1 -0
  74. package/dist/esm/components/index.js +1 -0
  75. package/dist/esm/components/index.js.map +1 -1
  76. package/dist/esm/hooks/useOnClickOutside.js +23 -0
  77. package/dist/esm/hooks/useOnClickOutside.js.map +1 -0
  78. package/package.json +1 -1
  79. package/dist/cjs/components/Tooltip/mergePlugins.js.map +0 -1
  80. package/dist/cjs/components/Tooltip/plugIns/disableForTouchDevicesPlugin.js.map +0 -1
  81. package/dist/cjs/components/Tooltip/plugIns/dpNamePlugin.js.map +0 -1
  82. package/dist/cjs/components/Tooltip/plugIns/escPlugin.js.map +0 -1
  83. package/dist/cjs/components/Tooltip/plugIns/index.js.map +0 -1
  84. package/dist/esm/components/Tooltip/mergePlugins.js.map +0 -1
  85. package/dist/esm/components/Tooltip/plugIns/disableForTouchDevicesPlugin.js.map +0 -1
  86. package/dist/esm/components/Tooltip/plugIns/dpNamePlugin.js.map +0 -1
  87. package/dist/esm/components/Tooltip/plugIns/escPlugin.js.map +0 -1
  88. package/dist/esm/components/Tooltip/plugIns/index.js.map +0 -1
  89. /package/dist/cjs/components/{Tooltip → TippyTooltip}/mergePlugins.js +0 -0
  90. /package/dist/cjs/components/{Tooltip → TippyTooltip}/plugIns/disableForTouchDevicesPlugin.js +0 -0
  91. /package/dist/cjs/components/{Tooltip → TippyTooltip}/plugIns/dpNamePlugin.js +0 -0
  92. /package/dist/cjs/components/{Tooltip → TippyTooltip}/plugIns/escPlugin.js +0 -0
  93. /package/dist/cjs/components/{Tooltip → TippyTooltip}/plugIns/index.js +0 -0
  94. /package/dist/esm/components/{Tooltip → TippyTooltip}/mergePlugins.js +0 -0
  95. /package/dist/esm/components/{Tooltip → TippyTooltip}/plugIns/disableForTouchDevicesPlugin.js +0 -0
  96. /package/dist/esm/components/{Tooltip → TippyTooltip}/plugIns/dpNamePlugin.js +0 -0
  97. /package/dist/esm/components/{Tooltip → TippyTooltip}/plugIns/escPlugin.js +0 -0
  98. /package/dist/esm/components/{Tooltip → TippyTooltip}/plugIns/index.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"EllipsesTooltip.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/EllipsesTooltip.tsx"],"names":[],"mappings":";;AAAA,+BAA+B;AAC/B,uCAAoC;AAEpC;;GAEG;AACH,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAiC,EAAE,EAAE;;IAChF,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,iBAAiB,CAAC;IAC7C,MAAM,UAAU,GAAG,KAAK,IAAI,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IAClE,MAAM,KAAK,GACT,CAAC,QAAQ,IAAI,UAAU,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAE3F,6EAA6E;IAC7E,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,IACxD,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CACnC,KAAK,CAAC,QAAQ,CACf,CAAC,CAAC,CAAC,CACF,oBAAC,iBAAO,OAAK,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,CAAC,UAAU,IAClD,KAAK,CAAC,QAAQ,CACP,CACX,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"EllipsesTooltip.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/EllipsesTooltip.tsx"],"names":[],"mappings":";;AAAA,+BAA+B;AAC/B,uCAAoC;AAGpC;;GAEG;AACH,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;;IAC/D,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,iBAAiB,CAAC;IAC7C,MAAM,UAAU,GAAG,KAAK,IAAI,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IAClE,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;QAC3C,oBAAC,iBAAO,OAAK,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,CAAC,UAAU,IAClD,KAAK,CAAC,QAAQ,CACP,CACN,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
@@ -2,118 +2,161 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TooltipCommonIcon = exports.Tooltip = void 0;
4
4
  const React = require("react");
5
- const styled_components_1 = require("styled-components");
6
- const react_1 = require("@tippyjs/react");
7
- const layout_1 = require("../../layout");
5
+ const react_1 = require("react");
8
6
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
9
7
  const Icon_1 = require("../Icon");
10
8
  const dpName_1 = require("../../utils/dpName");
11
- const mergePlugins_1 = require("./mergePlugins");
12
- const plugIns_1 = require("./plugIns");
13
- const react_2 = require("react");
14
- const getStyle = (styleType, theme) => {
15
- const styles = {
16
- light: {
17
- backgroundColor: theme.colors.grey3,
18
- color: theme.colors.grey_black100,
19
- border: `1px solid ${theme.colors.systemShade30}`,
20
- boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
21
- },
22
- lightBox: {
23
- backgroundColor: theme.colors.white,
24
- color: theme.colors.grey100,
25
- border: `1px solid ${theme.colors.grey20}`,
26
- borderColor: theme.colors.grey20,
27
- boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
28
- },
29
- // this type is based of the same styling as the modal component
30
- lightBoxModal: {
31
- backgroundColor: theme.colors.white,
32
- color: theme.colors.grey100,
33
- border: `1px solid ${theme.colors.grey20}`,
34
- borderColor: theme.colors.grey20,
35
- boxShadow: "0px 4px 16px rgba(0, 0, 0, 0.3)",
36
- },
37
- dark: {
38
- backgroundColor: theme.colors.grey_black100,
39
- color: theme.colors.white,
40
- border: "none",
41
- boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
42
- },
43
- extraDark: {
44
- backgroundColor: theme.colors.grey100,
45
- color: theme.colors.white,
46
- border: "none",
47
- borderColor: theme.colors.grey100,
48
- boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
49
- },
50
- };
51
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
52
- return styles[styleType] || styles.dark;
53
- };
9
+ const Portal_1 = require("../Portal");
10
+ const styles_1 = require("./styles");
11
+ const useOnClickOutside_1 = require("../../hooks/useOnClickOutside");
12
+ const utils_1 = require("../../utils");
13
+ const utils_2 = require("./utils");
14
+ const lodash_1 = require("lodash");
15
+ const react_resize_observer_1 = require("react-resize-observer");
54
16
  /**
55
17
  * @public
56
18
  */
57
- exports.Tooltip = (0, styled_components_1.default)(({ suppressClassNameWarning, styleType, arrow = false, width, offsetTop, styledCss, customComponent, arrowColor, offsetLeft, borderRadius, onPresEsc, enableOnTouchDevices, ...props }) => {
58
- const plugins = (0, react_2.useMemo)(() => (0, mergePlugins_1.default)([
59
- plugIns_1.dpNamePlugin,
60
- plugIns_1.escPlugin,
61
- enableOnTouchDevices ? null : plugIns_1.disableForTouchDevicesPlugin,
62
- ...(props.plugins || []),
63
- ], {
64
- onPresEsc,
65
- }), [enableOnTouchDevices, onPresEsc, props.plugins]);
66
- return React.createElement(react_1.default, { arrow: arrow, ...props, plugins: plugins });
67
- }).attrs({
68
- suppressClassNameWarning: true,
69
- }) `
70
- &.tippy-box {
71
- background-color: ${({ theme, styleType = "light" }) => getStyle(styleType, theme).backgroundColor};
72
- color: ${({ theme, styleType = "light" }) => getStyle(styleType, theme).color};
73
- box-shadow: ${({ theme, styleType = "light" }) => getStyle(styleType, theme).boxShadow};
74
- border: ${({ theme, styleType = "light" }) => getStyle(styleType, theme).border};
75
- border-radius: ${({ borderRadius }) => (borderRadius ? borderRadius : 3)}px;
76
- display: flex;
77
- align-items: center;
78
- justify-content: center;
79
- font-family: ${(props) => props.theme.fonts.primary};
80
- font-style: normal;
81
- font-weight: normal;
82
- font-size: 11px;
83
- line-height: 150%;
84
- max-width: ${({ maxWidth }) => maxWidth}px !important;
85
- word-break: break-word;
86
- width: ${({ width }) => width};
87
- ${({ offsetTop }) => offsetTop && `top: ${offsetTop}px !important`};
88
- ${({ offsetLeft }) => offsetLeft && `left: ${offsetLeft}px !important`};
89
- }
90
- ${({ styledCss }) => styledCss}
91
- ${({ customComponent }) => customComponent &&
92
- (0, styled_components_1.css) `
93
- .tippy-content {
94
- padding: 0;
95
- }
96
- `}
97
- ${({ arrowColor, theme, styleType = "light" }) => (0, styled_components_1.css) `
98
- .tippy-arrow {
99
- color: ${getStyle(styleType, theme).backgroundColor};
100
- border-top-color: ${arrowColor
101
- ? theme.colors[arrowColor]
102
- : getStyle(styleType, theme).backgroundColor} !important;
103
- &::before {
104
- color: ${arrowColor
105
- ? theme.colors[arrowColor]
106
- : getStyle(styleType, theme).backgroundColor};
19
+ const Tooltip = ({ styleType, width, maxWidth = 350, offsetTop, offsetLeft, offset, visible, interactive, styledCss, customComponent, borderRadius, onPressEsc, enableOnTouchDevices, placement = "top", disabled, content, className, delay = [200, 0], hideOnClick, onClickOutside, onShow, onHide, duration, arrow, arrowColor, children, preventOverflow, }) => {
20
+ const [isOpen, setIsOpen] = (0, react_1.useState)(!!visible);
21
+ const [position, setPosition] = (0, react_1.useState)({ x: 0, y: 0 });
22
+ const [arrowPosition, setArrowPosition] = (0, react_1.useState)({ x: 0, y: 0 });
23
+ const [maxDimensions, setMaxDimensions] = (0, react_1.useState)();
24
+ const [calculatedPlacement, setCalculatedPlacement] = (0, react_1.useState)(placement);
25
+ const triggerRef = (0, react_1.useRef)(null);
26
+ const tooltipRef = (0, react_1.useRef)(null);
27
+ const delayOpenRef = (0, react_1.useRef)();
28
+ const delayCloseRef = (0, react_1.useRef)();
29
+ const openDelay = typeof delay === "number" ? delay : delay && delay.length ? delay[0] : 0;
30
+ const closeDelay = typeof delay === "number" ? delay : delay && delay.length ? delay[1] : 0;
31
+ const calculatedOffset = offset || [offsetLeft !== null && offsetLeft !== void 0 ? offsetLeft : 0, offsetTop !== null && offsetTop !== void 0 ? offsetTop : 0];
32
+ const isDisabled = disabled || ((0, utils_1.isTouch)() && !enableOnTouchDevices);
33
+ const handleOpen = (0, react_1.useCallback)(() => {
34
+ setIsOpen(true);
35
+ onShow === null || onShow === void 0 ? void 0 : onShow();
36
+ }, [onShow]);
37
+ const handleClose = (0, react_1.useCallback)(() => {
38
+ setIsOpen(false);
39
+ onHide === null || onHide === void 0 ? void 0 : onHide();
40
+ }, [onHide]);
41
+ const onClickOutsideHandler = (0, react_1.useCallback)(() => {
42
+ if (hideOnClick) {
43
+ handleClose();
44
+ }
45
+ onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside();
46
+ }, [handleClose, hideOnClick, onClickOutside]);
47
+ (0, useOnClickOutside_1.useOnClickOutside)(tooltipRef, isOpen ? onClickOutsideHandler : undefined);
48
+ (0, react_1.useEffect)(() => {
49
+ if (!isDisabled && visible !== undefined) {
50
+ visible ? handleOpen() : handleClose();
51
+ }
52
+ }, [handleClose, handleOpen, isDisabled, visible]);
53
+ (0, react_1.useEffect)(() => {
54
+ const handleEsc = (event) => {
55
+ if (event.key === "Escape") {
56
+ onPressEsc === null || onPressEsc === void 0 ? void 0 : onPressEsc();
57
+ }
58
+ };
59
+ if (isOpen) {
60
+ window.addEventListener("keydown", handleEsc);
61
+ }
62
+ return () => {
63
+ window.removeEventListener("keydown", handleEsc);
64
+ };
65
+ }, [isOpen, onPressEsc]);
66
+ (0, react_1.useEffect)(() => {
67
+ return () => {
68
+ delayOpenRef.current && clearTimeout(delayOpenRef.current);
69
+ delayCloseRef.current && clearTimeout(delayCloseRef.current);
70
+ };
71
+ }, []);
72
+ const positionTooltip = (0, react_1.useCallback)(() => {
73
+ var _a, _b, _c;
74
+ if (isOpen && !isDisabled) {
75
+ const triggerRect = (_b = (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.firstElementChild) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
76
+ const tooltipRect = (_c = tooltipRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect();
77
+ if (triggerRect && tooltipRect) {
78
+ if (preventOverflow) {
79
+ setMaxDimensions({
80
+ width: window.innerWidth - 2 * utils_2.VIEWPORT_PADDING,
81
+ height: window.innerHeight - 2 * utils_2.VIEWPORT_PADDING,
82
+ });
83
+ }
84
+ const { position, calculatedPlacement } = (0, utils_2.getPositionAndPlacement)(utils_2.placementMap[placement], triggerRect, tooltipRect, preventOverflow);
85
+ setPosition(position);
86
+ setCalculatedPlacement(calculatedPlacement);
87
+ if (arrow) {
88
+ const arrowPosition = (0, utils_2.getArrowPosition)(calculatedPlacement, triggerRect, {
89
+ x: position.x,
90
+ y: position.y,
91
+ width: tooltipRect.width,
92
+ height: tooltipRect.height,
93
+ });
94
+ setArrowPosition(arrowPosition);
95
+ }
96
+ }
97
+ }
98
+ }, [arrow, isDisabled, isOpen, placement, preventOverflow]);
99
+ const throttledPositionTooltip = (0, react_1.useMemo)(() => (0, lodash_1.throttle)(positionTooltip, 100), [positionTooltip]);
100
+ (0, react_1.useLayoutEffect)(() => {
101
+ positionTooltip();
102
+ }, [positionTooltip]);
103
+ const onMouseEnterTrigger = (0, react_1.useCallback)(() => {
104
+ if (visible === undefined) {
105
+ delayOpenRef.current = setTimeout(() => {
106
+ handleOpen();
107
+ }, openDelay);
107
108
  }
108
- }
109
- `}
110
- `;
109
+ }, [handleOpen, openDelay, visible]);
110
+ const onMouseLeaveTrigger = (0, react_1.useCallback)(() => {
111
+ delayOpenRef.current && clearTimeout(delayOpenRef.current);
112
+ delayOpenRef.current = undefined;
113
+ if (visible === undefined) {
114
+ delayCloseRef.current = setTimeout(() => {
115
+ handleClose();
116
+ }, closeDelay);
117
+ }
118
+ }, [closeDelay, handleClose, visible]);
119
+ const onMouseEnterTooltip = (0, react_1.useCallback)(() => {
120
+ if (interactive) {
121
+ delayCloseRef.current && clearTimeout(delayCloseRef.current);
122
+ delayCloseRef.current = undefined;
123
+ handleOpen();
124
+ }
125
+ }, [handleOpen, interactive]);
126
+ const onMouseLeaveTooltip = (0, react_1.useCallback)(() => {
127
+ if (visible === undefined) {
128
+ delayOpenRef.current && clearTimeout(delayOpenRef.current);
129
+ delayCloseRef.current = setTimeout(() => {
130
+ handleClose();
131
+ }, closeDelay);
132
+ }
133
+ }, [closeDelay, handleClose, visible]);
134
+ (0, react_1.useEffect)(() => {
135
+ window.addEventListener("resize", throttledPositionTooltip);
136
+ return () => window.removeEventListener("resize", throttledPositionTooltip);
137
+ }, [throttledPositionTooltip]);
138
+ if (isDisabled) {
139
+ return React.createElement(React.Fragment, null, children);
140
+ }
141
+ return (React.createElement(React.Fragment, null,
142
+ isOpen ? (React.createElement(Portal_1.Portal, null,
143
+ React.createElement(styles_1.Wrapper, { isOpen: isOpen, position: position, isVisible: true, className: "tooltip-wrapper" },
144
+ React.createElement(styles_1.Root, { ref: tooltipRef, width: width, maxHeight: maxDimensions === null || maxDimensions === void 0 ? void 0 : maxDimensions.height, maxWidth: (maxDimensions === null || maxDimensions === void 0 ? void 0 : maxDimensions.width) || maxWidth, placement: calculatedPlacement, className: `tooltip-root ${className !== null && className !== void 0 ? className : ""}`, onMouseEnter: onMouseEnterTooltip, onMouseLeave: onMouseLeaveTooltip, styledCss: styledCss },
145
+ React.createElement(react_resize_observer_1.default, { onResize: () => {
146
+ positionTooltip();
147
+ } }),
148
+ React.createElement(styles_1.Box, { padding: customComponent ? "0" : undefined, styleType: styleType, borderRadius: borderRadius, offset: calculatedOffset, className: "tooltip-box", duration: duration },
149
+ React.createElement(styles_1.Content, { className: "tooltip-content" }, content),
150
+ arrow ? (React.createElement(styles_1.Arrow, { placement: calculatedPlacement, position: arrowPosition, arrowColor: arrowColor, styleType: styleType, className: "tooltip-arrow" })) : null))))) : null,
151
+ React.createElement(styles_1.Trigger, { ref: triggerRef, onMouseEnter: onMouseEnterTrigger, onMouseLeave: onMouseLeaveTrigger }, children)));
152
+ };
153
+ exports.Tooltip = Tooltip;
111
154
  /**
112
155
  * @public
113
156
  */
114
157
  function TooltipCommonIcon({ content, styleType = "light", placement = "top", iconSize = 10, }) {
115
- return (React.createElement(exports.Tooltip, { ...(0, dpName_1.dpNameProp)("Tooltip"), content: content, suppressClassNameWarning: true, placement: placement, styleType: styleType },
116
- React.createElement(layout_1.Stack, { align: "center" },
158
+ return (React.createElement(exports.Tooltip, { ...(0, dpName_1.dpNameProp)("Tooltip"), content: content, placement: placement, styleType: styleType },
159
+ React.createElement("span", null,
117
160
  React.createElement(Icon_1.Icon, { icon: free_solid_svg_icons_1.faQuestionCircle, themeColor: "grey40", size: iconSize }))));
118
161
  }
119
162
  exports.TooltipCommonIcon = TooltipCommonIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,yDAAmG;AACnG,0CAAmD;AACnD,yCAAqC;AACrC,4EAAqE;AACrE,kCAA+B;AAE/B,+CAAgD;AAChD,iDAA0C;AAC1C,uCAAkF;AAClF,iCAAgC;AA6BhC,MAAM,QAAQ,GAAG,CAAC,SAA0B,EAAE,KAAmB,EAAE,EAAE;IACnE,MAAM,MAAM,GAAG;QACb,KAAK,EAAE;YACL,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;YACnC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa;YACjC,MAAM,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE;YACjD,SAAS,EAAE,4EAA4E;SACxF;QACD,QAAQ,EAAE;YACR,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;YACnC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;YAC3B,MAAM,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;YAC1C,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;YAChC,SAAS,EAAE,4EAA4E;SACxF;QACD,gEAAgE;QAChE,aAAa,EAAE;YACb,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;YACnC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;Y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OAAmB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/index.ts"],"names":[],"mappings":";;;AAAA,qCAAuD;AAA9C,kGAAA,OAAO,OAAA;AAAE,4GAAA,iBAAiB,OAAA;AAGnC,qDAA+D;AAAtD,kHAAA,OAAO,OAAmB"}
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStyle = exports.Arrow = exports.Trigger = exports.Content = exports.Box = exports.Root = exports.Wrapper = void 0;
4
+ const styled_components_1 = require("styled-components");
5
+ const styled_components_2 = require("styled-components");
6
+ const ts_pattern_1 = require("ts-pattern");
7
+ const utils_1 = require("./utils");
8
+ const DEFAULT_OFFSET = 8;
9
+ exports.Wrapper = styled_components_2.default.div `
10
+ z-index: 9999;
11
+ display: ${({ isOpen }) => (isOpen ? "block" : "none")};
12
+ visibility: ${({ isVisible }) => (isVisible ? "visible" : "hidden")};
13
+ position: absolute;
14
+ inset: 0px 0px auto auto;
15
+ margin: 0px;
16
+ top: 0;
17
+ left: 0;
18
+ transform: ${({ position }) => `translate(${position.x}px, ${position.y}px)`};
19
+ width: fit-content;
20
+ `;
21
+ exports.Root = styled_components_2.default.div `
22
+ padding: ${({ placement }) => getPositionPadding(placement)};
23
+ width: ${({ width }) => width};
24
+ max-width: ${({ maxWidth }) => maxWidth
25
+ ? typeof maxWidth === "string"
26
+ ? `${maxWidth} !important`
27
+ : `${maxWidth}px !important`
28
+ : undefined};
29
+ max-height: ${({ maxHeight }) => maxHeight}px !important;
30
+ ${({ styledCss }) => styledCss}
31
+ `;
32
+ const getPositionPadding = (placement) => placement.includes("top")
33
+ ? `0 0 ${DEFAULT_OFFSET}px 0`
34
+ : placement.includes("bottom")
35
+ ? `${DEFAULT_OFFSET}px 0 0 0`
36
+ : placement.includes("left")
37
+ ? `0 ${DEFAULT_OFFSET}px 0 0`
38
+ : `0 0 0 ${DEFAULT_OFFSET}px`;
39
+ exports.Box = styled_components_2.default.div `
40
+ position: relative;
41
+ padding: ${({ padding }) => padding !== null && padding !== void 0 ? padding : "5px 9px"};
42
+ z-index: 1;
43
+
44
+ background-color: ${({ theme, styleType = "light" }) => (0, exports.getStyle)(styleType, theme).backgroundColor};
45
+ color: ${({ theme, styleType = "light" }) => (0, exports.getStyle)(styleType, theme).color};
46
+ box-shadow: ${({ theme, styleType = "light" }) => (0, exports.getStyle)(styleType, theme).boxShadow};
47
+ border: ${({ theme, styleType = "light" }) => (0, exports.getStyle)(styleType, theme).border};
48
+ border-radius: ${({ borderRadius }) => (borderRadius ? borderRadius : 3)}px;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ font-family: ${(props) => props.theme.fonts.primary};
53
+ font-style: normal;
54
+ font-weight: normal;
55
+ font-size: 11px;
56
+ line-height: 150%;
57
+ word-break: break-word;
58
+ ${({ offset: [, offsetTop] }) => offsetTop && `top: ${offsetTop}px !important`};
59
+ ${({ offset: [offsetLeft] }) => offsetLeft && `left: ${offsetLeft}px !important`};
60
+ transition-property: transform, visibility, opacity;
61
+ transition-duration: ${({ duration = 250 }) => duration}ms;
62
+ `;
63
+ exports.Content = styled_components_2.default.div ``;
64
+ exports.Trigger = styled_components_2.default.div `
65
+ display: contents;
66
+ `;
67
+ exports.Arrow = styled_components_2.default.div `
68
+ position: absolute;
69
+ width: ${utils_1.ARROW_WIDTH}px;
70
+ height: ${utils_1.ARROW_WIDTH}px;
71
+ transform: ${({ position }) => `translate(${position.x}px, ${position.y}px)`};
72
+ ${({ placement, arrowColor, theme, styleType }) => getArrowCss(placement, arrowColor, theme, styleType)}
73
+
74
+ &::before {
75
+ content: "";
76
+ position: absolute;
77
+ ${({ placement, arrowColor, theme, styleType }) => getArrowPseudoCss("before", placement, arrowColor, theme, styleType)}
78
+ }
79
+
80
+ &::after {
81
+ content: "";
82
+ z-index: -1;
83
+ position: absolute;
84
+ ${({ placement, arrowColor, theme, styleType }) => getArrowPseudoCss("after", placement, arrowColor, theme, styleType)}
85
+ }
86
+ `;
87
+ const getArrowCss = (placement, arrowColor, theme, styleType = "light") => {
88
+ const color = arrowColor ? theme.colors[arrowColor] : (0, exports.getStyle)(styleType, theme).backgroundColor;
89
+ return (0, ts_pattern_1.match)(placement)
90
+ .when((placement) => placement.includes("bottom"), () => (0, styled_components_1.css) `
91
+ top: 0;
92
+ left: 0;
93
+ color: ${color};
94
+ border-top-color: ${color};
95
+ `)
96
+ .when((placement) => placement.includes("top"), () => (0, styled_components_1.css) `
97
+ bottom: 0;
98
+ left: 0;
99
+ color: ${color};
100
+ border-bottom-color: ${color};
101
+ `)
102
+ .when((placement) => placement.includes("left"), () => (0, styled_components_1.css) `
103
+ right: 0;
104
+ top: 0;
105
+ color: ${color};
106
+ border-left-color: ${color};
107
+ `)
108
+ .when((placement) => placement.includes("right"), () => (0, styled_components_1.css) `
109
+ left: 0;
110
+ top: 0;
111
+ color: ${color};
112
+ border-right-color: ${color};
113
+ `)
114
+ .otherwise(() => undefined);
115
+ };
116
+ const getArrowPseudoCss = (type, placement, arrowColor, theme, styleType = "light") => {
117
+ const borderColor = type === "before"
118
+ ? "initial"
119
+ : arrowColor
120
+ ? theme.colors[arrowColor]
121
+ : (0, exports.getStyle)(styleType, theme).borderColor;
122
+ const offset = type === "before" ? "-7px" : "-8px";
123
+ const halfArrowWidth = `${utils_1.ARROW_WIDTH / 2}px`;
124
+ return (0, ts_pattern_1.match)(placement)
125
+ .when((placement) => placement.includes("bottom"), () => (0, styled_components_1.css) `
126
+ left: 0;
127
+ top: ${offset};
128
+ border-color: transparent;
129
+ border-bottom-color: ${borderColor};
130
+ border-width: 0 ${halfArrowWidth} ${halfArrowWidth};
131
+ border-style: solid;
132
+ `)
133
+ .when((placement) => placement.includes("top"), () => (0, styled_components_1.css) `
134
+ left: 0;
135
+ bottom: ${offset};
136
+ border-color: transparent;
137
+ border-top-color: ${borderColor};
138
+ border-width: ${halfArrowWidth} ${halfArrowWidth} 0;
139
+ border-style: solid;
140
+ `)
141
+ .when((placement) => placement.includes("left"), () => (0, styled_components_1.css) `
142
+ top: 0;
143
+ right: ${offset};
144
+ border-color: transparent;
145
+ border-left-color: ${borderColor};
146
+ border-width: ${halfArrowWidth} 0 ${halfArrowWidth} ${halfArrowWidth};
147
+ border-style: solid;
148
+ `)
149
+ .when((placement) => placement.includes("right"), () => (0, styled_components_1.css) `
150
+ top: 0;
151
+ left: ${offset};
152
+ border-color: transparent;
153
+ border-right-color: ${borderColor};
154
+ border-width: ${halfArrowWidth} ${halfArrowWidth} ${halfArrowWidth} 0;
155
+ border-style: solid;
156
+ `)
157
+ .otherwise(() => undefined);
158
+ };
159
+ const getStyle = (styleType, theme) => {
160
+ const styles = {
161
+ light: {
162
+ backgroundColor: theme.colors.grey3,
163
+ color: theme.colors.grey_black100,
164
+ border: `1px solid ${theme.colors.systemShade30}`,
165
+ borderColor: theme.colors.systemShade30,
166
+ boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
167
+ },
168
+ lightBox: {
169
+ backgroundColor: theme.colors.white,
170
+ color: theme.colors.grey100,
171
+ border: `1px solid ${theme.colors.grey20}`,
172
+ borderColor: theme.colors.grey20,
173
+ boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
174
+ },
175
+ // this type is based of the same styling as the modal component
176
+ lightBoxModal: {
177
+ backgroundColor: theme.colors.white,
178
+ color: theme.colors.grey100,
179
+ border: `1px solid ${theme.colors.grey20}`,
180
+ borderColor: theme.colors.grey20,
181
+ boxShadow: "0px 4px 16px rgba(0, 0, 0, 0.3)",
182
+ },
183
+ dark: {
184
+ backgroundColor: theme.colors.grey_black100,
185
+ color: theme.colors.white,
186
+ border: `1px solid ${theme.colors.grey_black100}`,
187
+ borderColor: theme.colors.grey_black100,
188
+ boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
189
+ },
190
+ extraDark: {
191
+ backgroundColor: theme.colors.grey100,
192
+ color: theme.colors.white,
193
+ border: `1px solid ${theme.colors.grey100}`,
194
+ borderColor: theme.colors.grey100,
195
+ boxShadow: "0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06);",
196
+ },
197
+ };
198
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
199
+ return styles[styleType] || styles.dark;
200
+ };
201
+ exports.getStyle = getStyle;
202
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/styles.ts"],"names":[],"mappings":";;;AAAA,yDAA2F;AAC3F,yDAAuC;AACvC,2CAAmC;AAGnC,mCAAsC;AAEtC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,OAAO,GAAG,2BAAM,CAAC,GAAG,CAI/B;;aAEW,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;gBACxC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;;;;;;eAMtD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,aAAa,QAAQ,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC,KAAK;;CAE7E,CAAC;AAEW,QAAA,IAAI,GAAG,2BAAM,CAAC,GAAG,CAM5B;aACW,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,SAAS,CAAC;WAClD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK;eAChB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAC5B,QAAQ;IACN,CAAC,CAAC,OAAO,QAAQ,KAAK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EAAE;YACT,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;YACrC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;YACzB,MAAM,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE;YAC3C,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;YACjC,SAAS,EAAE,4EAA4E;SACxF;KACF,CAAC;IACF,uEAAuE;IACvE,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC;AAC1C,CAAC,CAAC;AAzCW,QAAA,QAAQ,YAyCnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/types.ts"],"names":[],"mappings":""}