@elliemae/ds-tooltip 2.0.0-alpha.10 → 2.0.0-alpha.14

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.
@@ -5,24 +5,27 @@ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  var _svg;
7
7
 
8
- const DSTooltipArrow = ({
9
- placement,
10
- style,
11
- arrowElementRef
12
- }) => /*#__PURE__*/jsx(StyledTooltipArrow, {
13
- "data-placement": placement,
14
- style: style,
15
- ref: arrowElementRef,
16
- "data-testid": "ds-tooltip-arrow",
17
- children: _svg || (_svg = /*#__PURE__*/_jsx("svg", {
18
- viewBox: "0 0 30 30"
19
- }, void 0, /*#__PURE__*/_jsx("path", {
20
- className: "stroke",
21
- d: "M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26 C26.7,29,24.6,28.1,23.7,27.1z"
22
- }), /*#__PURE__*/_jsx("path", {
23
- className: "fill",
24
- d: "M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"
25
- })))
26
- }, "popper-arrow");
8
+ const DSTooltipArrow = _ref => {
9
+ let {
10
+ placement,
11
+ style,
12
+ arrowElementRef
13
+ } = _ref;
14
+ return /*#__PURE__*/jsx(StyledTooltipArrow, {
15
+ "data-placement": placement,
16
+ style: style,
17
+ ref: arrowElementRef,
18
+ "data-testid": "ds-tooltip-arrow",
19
+ children: _svg || (_svg = /*#__PURE__*/_jsx("svg", {
20
+ viewBox: "0 0 30 30"
21
+ }, void 0, /*#__PURE__*/_jsx("path", {
22
+ className: "stroke",
23
+ d: "M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26 C26.7,29,24.6,28.1,23.7,27.1z"
24
+ }), /*#__PURE__*/_jsx("path", {
25
+ className: "fill",
26
+ d: "M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"
27
+ })))
28
+ }, "popper-arrow");
29
+ };
27
30
 
28
31
  export { DSTooltipArrow };
@@ -9,9 +9,7 @@ const tooltipV2Props = {
9
9
  title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,
10
10
  delayClose: PropTypes.number.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),
11
11
  delayOpen: PropTypes.number.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),
12
- triggerComponent: PropTypes.element.description(`The component that will open/close the tooltip.
13
- Cannot be used with disabled elements.
14
- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`).isRequired,
12
+ triggerComponent: PropTypes.element.description("The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled").isRequired,
15
13
  getIsOpen: PropTypes.func.description('Whether the tooltip is visible or not'),
16
14
  onOpen: PropTypes.func.description('Callback when the tooltip opens'),
17
15
  showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),
package/esm/v2/styles.js CHANGED
@@ -1,47 +1,41 @@
1
+ import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
1
2
  import styled from 'styled-components';
2
3
  import { kfrm, css } from '@elliemae/ds-system';
3
4
 
4
- const showAnimation = kfrm`
5
- from {
6
- opacity: 0;
7
- transform: scale(0.8);
8
- }
9
-
10
- to {
11
- opacity: 1;
12
- transform: scale(1);
13
- visibility: visible;
14
- }
15
- `;
16
- const hideAnimation = kfrm`
17
- 0% {
18
- opacity: 1;
19
- transform: scale(1);
20
- }
21
-
22
- 100% {
23
- opacity: 0;
24
- transform: scale(0.8);
25
- }
26
- `;
5
+ var _templateObject, _templateObject2, _templateObject3;
6
+ const showAnimation = kfrm(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n"])));
7
+ const hideAnimation = kfrm(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n\n 100% {\n opacity: 0;\n transform: scale(0.8);\n }\n"])));
27
8
  const StyledTooltipContainer = /*#__PURE__*/styled.div.withConfig({
28
9
  componentId: "sc-1dtjf9j-0"
29
10
  })(["&[data-popper-reference-hidden='true']{display:none;pointer-events:none;}"]);
30
11
  const StyledAnimatedTooltip = /*#__PURE__*/styled.div.withConfig({
31
12
  componentId: "sc-1dtjf9j-1"
32
- })(["text-align:center;min-width:", ";max-width:250px;min-height:24px;padding:", ";position:relative;background-color:white;border-radius:2px;font-size:13px;color:", ";box-shadow:0 1px 5px 0 rgb(0 0 0 / 13%),0 2px 4px 0 rgb(0 0 0 / 20%);filter:drop-shadow(0 4px 8px rgba(0,0,0,0.2));visibility:", ";", " transition:visibility 0.1s ease-in;"], ({
33
- theme
34
- }) => theme.space.l, ({
35
- theme
36
- }) => `${theme.space.xxxs} ${theme.space.xs}`, ({
37
- theme
38
- }) => theme.colors.neutral[600], ({
39
- showTooltip
40
- }) => showTooltip ? 'visible' : 'hidden', ({
41
- showTooltip
42
- }) => css`
43
- animation: ${showTooltip ? showAnimation : hideAnimation} 0.1s ease-in;
44
- `);
13
+ })(["text-align:center;min-width:", ";max-width:250px;min-height:24px;padding:", ";position:relative;background-color:white;border-radius:2px;font-size:13px;color:", ";box-shadow:0 1px 5px 0 rgb(0 0 0 / 13%),0 2px 4px 0 rgb(0 0 0 / 20%);filter:drop-shadow(0 4px 8px rgba(0,0,0,0.2));visibility:", ";", " transition:visibility 0.1s ease-in;"], _ref => {
14
+ let {
15
+ theme
16
+ } = _ref;
17
+ return theme.space.l;
18
+ }, _ref2 => {
19
+ let {
20
+ theme
21
+ } = _ref2;
22
+ return "".concat(theme.space.xxxs, " ").concat(theme.space.xs);
23
+ }, _ref3 => {
24
+ let {
25
+ theme
26
+ } = _ref3;
27
+ return theme.colors.neutral[600];
28
+ }, _ref4 => {
29
+ let {
30
+ showTooltip
31
+ } = _ref4;
32
+ return showTooltip ? 'visible' : 'hidden';
33
+ }, _ref5 => {
34
+ let {
35
+ showTooltip
36
+ } = _ref5;
37
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n animation: ", " 0.1s ease-in;\n "])), showTooltip ? showAnimation : hideAnimation);
38
+ });
45
39
  const StyledTriggerComponentContainer = /*#__PURE__*/styled.div.withConfig({
46
40
  componentId: "sc-1dtjf9j-2"
47
41
  })(["display:inline-block;"]);
@@ -1,4 +1,14 @@
1
- const setMultipleRefs = (...refs) => {
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+
7
+ const setMultipleRefs = function () {
8
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ refs[_key] = arguments[_key];
10
+ }
11
+
2
12
  const filteredRefs = refs.filter(Boolean);
3
13
  if (!filteredRefs.length) return null;
4
14
  if (filteredRefs.length === 0) return filteredRefs[0];
@@ -6,7 +6,8 @@ const noop = () => {};
6
6
  const defaultProps = {
7
7
  onOpen: noop,
8
8
  onClose: noop,
9
- id: ''
9
+ id: '',
10
+ textAlign: 'left'
10
11
  };
11
12
  const useWithDefaultProps = props => useMemoMergePropsWithDefault(props, defaultProps);
12
13
 
package/esm/v3/index.js CHANGED
@@ -1,21 +1,36 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
- import { useState, useCallback } from 'react';
4
+ import 'core-js/modules/web.dom-collections.iterator.js';
5
+ import 'core-js/modules/esnext.async-iterator.filter.js';
6
+ import 'core-js/modules/esnext.iterator.constructor.js';
7
+ import 'core-js/modules/esnext.iterator.filter.js';
8
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
9
+ import 'core-js/modules/esnext.iterator.for-each.js';
10
+ import { useState, useCallback, useEffect } from 'react';
5
11
  import { DSPopperJS } from '@elliemae/ds-popperjs';
6
12
  import { describe } from 'react-desc';
7
13
  import { dsTooltipPropTypes } from './propsTypes.js';
8
14
  import { useWithDefaultProps } from './config/useWithDefaultProps.js';
9
15
  import { TooltipV3DatatestId } from './TooltipV3DatatestId.js';
10
- import { StyledTooltipContainer, StyledTooltipText } from './styleds.js';
11
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
16
+ import { StyledTriggerWrapper, StyledTooltipContainer, StyledTooltipText, StyledMouseOverDetectionBox } from './styleds.js';
17
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
12
18
 
13
- const _excluded = ["text", "children", "onOpen", "onClose", "id"];
19
+ var _StyledMouseOverDetec;
20
+
21
+ const _excluded = ["text", "children", "onOpen", "onClose", "id", "textAlign"];
14
22
 
15
23
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
16
24
 
17
25
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
26
 
27
+ const useGlobalKeyboardListener = func => {
28
+ useEffect(() => {
29
+ document.addEventListener('keydown', func);
30
+ return () => document.removeEventListener('keydown', func);
31
+ }, [func]);
32
+ };
33
+
19
34
  const DSTooltipV3 = props => {
20
35
  const _useWithDefaultProps = useWithDefaultProps(props),
21
36
  {
@@ -23,10 +38,14 @@ const DSTooltipV3 = props => {
23
38
  children,
24
39
  onOpen,
25
40
  onClose,
26
- id
41
+ id,
42
+ textAlign
27
43
  } = _useWithDefaultProps,
28
44
  extraPopperJsProps = _objectWithoutProperties(_useWithDefaultProps, _excluded);
29
45
 
46
+ const [isFocused, setIsFocused] = useState(false);
47
+ const [isHover, setIsHover] = useState(false);
48
+ const [latestOpenInteraction, setLatestOpenInteraction] = useState('');
30
49
  const [referenceElement, setReferenceElement] = useState();
31
50
  const [showPopover, setShowPopover] = useState(false);
32
51
  const showTooltip = useCallback(() => {
@@ -37,29 +56,57 @@ const DSTooltipV3 = props => {
37
56
  setShowPopover(false);
38
57
  onClose();
39
58
  }, [onClose]);
40
- const handleEscKey = useCallback(({
41
- key
42
- }) => {
59
+ const onFocus = useCallback(() => {
60
+ setIsFocused(true);
61
+
62
+ if (!showPopover) {
63
+ showTooltip();
64
+ setLatestOpenInteraction('onFocus');
65
+ }
66
+ }, [showPopover, showTooltip]);
67
+ const onBlur = useCallback(() => {
68
+ setIsFocused(false);
69
+ if (!isHover || latestOpenInteraction === 'onFocus') hideTooltip();
70
+ }, [hideTooltip, isHover, latestOpenInteraction]);
71
+ const onMouseEnter = useCallback(() => {
72
+ setIsHover(true);
73
+
74
+ if (!showPopover) {
75
+ showTooltip();
76
+ setLatestOpenInteraction('onMouseEnter');
77
+ }
78
+ }, [showPopover, showTooltip]);
79
+ const onMouseLeave = useCallback(() => {
80
+ setIsHover(false);
81
+ if (!isFocused || latestOpenInteraction === 'onMouseEnter') hideTooltip();
82
+ }, [hideTooltip, isFocused, latestOpenInteraction]);
83
+ const handleEscKey = useCallback(_ref => {
84
+ let {
85
+ key
86
+ } = _ref;
43
87
  if (key === 'Escape') hideTooltip();
44
88
  }, [hideTooltip]);
45
- return /*#__PURE__*/jsxs(Fragment, {
46
- children: [/*#__PURE__*/jsx(DSPopperJS, _objectSpread(_objectSpread({
47
- referenceElement: referenceElement,
48
- showPopover: showPopover
49
- }, extraPopperJsProps), {}, {
50
- children: /*#__PURE__*/_jsx("div", {
51
- "data-testid": `${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`
52
- }, void 0, /*#__PURE__*/_jsx(StyledTooltipContainer, {}, void 0, /*#__PURE__*/_jsx(StyledTooltipText, {}, void 0, text)))
53
- })), /*#__PURE__*/jsx("div", {
54
- onMouseOver: showTooltip,
55
- onFocus: showTooltip,
56
- onMouseOut: hideTooltip,
57
- onBlur: hideTooltip,
58
- onKeyDown: handleEscKey,
89
+ useGlobalKeyboardListener(handleEscKey);
90
+ return /*#__PURE__*/jsx(Fragment, {
91
+ children: /*#__PURE__*/jsxs(StyledTriggerWrapper, {
92
+ onMouseEnter: onMouseEnter,
93
+ onMouseLeave: onMouseLeave,
94
+ onFocus: onFocus,
95
+ onBlur: onBlur,
59
96
  ref: setReferenceElement,
60
- "data-testid": `${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`,
61
- children: children
62
- })]
97
+ "data-testid": "".concat(TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : ''),
98
+ children: [/*#__PURE__*/jsx(DSPopperJS, _objectSpread(_objectSpread({
99
+ referenceElement: referenceElement,
100
+ showPopover: showPopover,
101
+ withoutPortal: true
102
+ }, extraPopperJsProps), {}, {
103
+ children: /*#__PURE__*/_jsx("div", {
104
+ "data-testid": "".concat(TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
105
+ }, void 0, /*#__PURE__*/_jsx(StyledTooltipContainer, {}, void 0, /*#__PURE__*/_jsx(StyledTooltipText, {
106
+ textAlign: textAlign
107
+ }, void 0, text), _StyledMouseOverDetec || (_StyledMouseOverDetec = /*#__PURE__*/_jsx(StyledMouseOverDetectionBox, {}))))
108
+ })), children]
109
+ })
63
110
  });
64
111
  };
65
112
 
@@ -2,9 +2,14 @@ import { PropTypes } from 'react-desc';
2
2
 
3
3
  const dsTooltipPropTypes = {
4
4
  /**
5
- * Tooltip text to be displayed on hover
5
+ * Tooltip text to be displayed on hover/focus
6
6
  */
7
- text: PropTypes.string.description('Tooltip text to be displayed on hover').isRequired,
7
+ text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,
8
+
9
+ /**
10
+ * Tooltip text alignment
11
+ */
12
+ textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify', 'initial', 'inherit']).description('Tooltip text alignment').defaultValue('left'),
8
13
 
9
14
  /**
10
15
  * Element to tie the tooltip to, must be a single node
@@ -27,6 +32,16 @@ const dsTooltipPropTypes = {
27
32
  */
28
33
  boundaryElement: PropTypes.element.description('Bounding element to calculate upon, defaults to "clippingParents",' + 'which are the scrolling containers that may cause element to be partially or fully cut off').defaultValue(undefined),
29
34
 
35
+ /**
36
+ * Whether or not the popper context menu should be animated
37
+ */
38
+ withoutAnimation: PropTypes.bool.description('Whether or not the popper context menu should be animated').defaultValue(false),
39
+
40
+ /**
41
+ * Popper context menus Animation duration in ms
42
+ */
43
+ animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),
44
+
30
45
  /**
31
46
  * When using portal, the container in which to append the DOM content, defaults to document body
32
47
  */
package/esm/v3/styleds.js CHANGED
@@ -2,15 +2,35 @@ import styled from 'styled-components';
2
2
 
3
3
  const StyledTooltipContainer = /*#__PURE__*/styled.div.withConfig({
4
4
  componentId: "sc-18a4gem-0"
5
- })(["text-align:center;min-width:", ";max-width:250px;min-height:24px;padding:", ";position:relative;background-color:white;border-radius:2px;font-size:13px;color:", ";box-shadow:0 1px 5px 0 rgb(0 0 0 / 13%),0 2px 4px 0 rgb(0 0 0 / 20%);filter:drop-shadow(0 4px 8px rgba(0,0,0,0.2));transition:visibility 0.1s ease-in;"], ({
6
- theme
7
- }) => theme.space.l, ({
8
- theme
9
- }) => `${theme.space.xxxs} ${theme.space.xs}`, ({
10
- theme
11
- }) => theme.colors.neutral[600]);
5
+ })(["text-align:center;min-width:", ";max-width:250px;min-height:30px;display:grid;align-items:center;padding:", ";position:relative;background-color:white;border-radius:2px;font-size:13px;color:", ";"], _ref => {
6
+ let {
7
+ theme
8
+ } = _ref;
9
+ return theme.space.l;
10
+ }, _ref2 => {
11
+ let {
12
+ theme
13
+ } = _ref2;
14
+ return "".concat(theme.space.xxxs, " ").concat(theme.space.xs);
15
+ }, _ref3 => {
16
+ let {
17
+ theme
18
+ } = _ref3;
19
+ return theme.colors.neutral[600];
20
+ });
12
21
  const StyledTooltipText = /*#__PURE__*/styled.div.withConfig({
13
22
  componentId: "sc-18a4gem-1"
14
- })(["white-space:normal;word-wrap:break-word;display:inline-block;"]);
23
+ })(["white-space:normal;word-wrap:break-word;display:inline-block;text-align:", ";"], _ref4 => {
24
+ let {
25
+ textAlign
26
+ } = _ref4;
27
+ return textAlign;
28
+ });
29
+ const StyledMouseOverDetectionBox = /*#__PURE__*/styled.div.withConfig({
30
+ componentId: "sc-18a4gem-2"
31
+ })(["position:absolute;top:-15px;right:-15px;width:calc(100% + 30px);height:calc(100% + 30px);z-index:-1;"]);
32
+ const StyledTriggerWrapper = /*#__PURE__*/styled.div.withConfig({
33
+ componentId: "sc-18a4gem-3"
34
+ })(["display:inline-block;width:100%;"]);
15
35
 
16
- export { StyledTooltipContainer, StyledTooltipText };
36
+ export { StyledMouseOverDetectionBox, StyledTooltipContainer, StyledTooltipText, StyledTriggerWrapper };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-tooltip",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.14",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tooltip",
6
6
  "module": "./esm/index.js",
@@ -92,18 +92,31 @@
92
92
  "build": "node ../../scripts/build/build.js"
93
93
  },
94
94
  "dependencies": {
95
- "@elliemae/ds-classnames": "2.0.0-alpha.10",
96
- "@elliemae/ds-popper": "2.0.0-alpha.10",
97
- "@elliemae/ds-shared": "2.0.0-alpha.10",
98
- "@elliemae/ds-system": "2.0.0-alpha.10",
99
- "@elliemae/ds-utilities": "2.0.0-alpha.10",
100
- "@popperjs/core": "2.9.3",
101
- "react-desc": "^4.1.3",
102
- "react-popper": "2.2.5"
95
+ "@elliemae/ds-button": "2.0.0-alpha.14",
96
+ "@elliemae/ds-classnames": "2.0.0-alpha.14",
97
+ "@elliemae/ds-popper": "2.0.0-alpha.14",
98
+ "@elliemae/ds-popperjs": "2.0.0-alpha.14",
99
+ "@elliemae/ds-portal": "2.0.0-alpha.14",
100
+ "@elliemae/ds-props-helpers": "2.0.0-alpha.14",
101
+ "@elliemae/ds-shared": "2.0.0-alpha.14",
102
+ "@elliemae/ds-system": "2.0.0-alpha.14",
103
+ "@elliemae/ds-utilities": "2.0.0-alpha.14",
104
+ "@popperjs/core": "~2.9.2",
105
+ "react-desc": "~4.1.3",
106
+ "react-popper": "~2.2.5"
107
+ },
108
+ "devDependencies": {
109
+ "@testing-library/jest-dom": "~5.15.0",
110
+ "@testing-library/react": "~12.1.2",
111
+ "@testing-library/user-event": "~13.5.0",
112
+ "react": "^17.0.2",
113
+ "react-dom": "^17.0.2",
114
+ "styled-components": "~5.3.3"
103
115
  },
104
116
  "peerDependencies": {
105
117
  "react": "^17.0.2",
106
- "react-dom": "^17.0.2"
118
+ "react-dom": "^17.0.2",
119
+ "styled-components": "^5.3.3"
107
120
  },
108
121
  "publishConfig": {
109
122
  "access": "public",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
1
2
  import React from 'react';
2
3
  declare const TooltipContainer: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
3
4
  declare const TooltipText: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
@@ -21,23 +22,85 @@ declare const DSTooltip: {
21
22
  zIndex: any;
22
23
  }): JSX.Element;
23
24
  propTypes: {
24
- containerProps: any;
25
- placement: any;
26
- title: any;
27
- delayClose: any;
28
- delayOpen: any;
29
- interactionType: any;
30
- triggerComponent: any;
31
- isOpen: any;
32
- onOpen: any;
33
- springAnimationComponent: any;
34
- showArrow: any;
35
- className: any;
36
- tooltipType: any;
37
- zIndex: any;
38
- innerRef: any;
25
+ containerProps: {
26
+ defaultValue<T = unknown>(arg: T): {
27
+ deprecated: import("react-desc").PropTypesDescValidator;
28
+ };
29
+ isRequired: import("react-desc").PropTypesDescValidator;
30
+ };
31
+ placement: {
32
+ deprecated: import("react-desc").PropTypesDescValidator;
33
+ };
34
+ title: import("react-desc").PropTypesDescValidator;
35
+ delayClose: {
36
+ deprecated: import("react-desc").PropTypesDescValidator;
37
+ };
38
+ delayOpen: {
39
+ deprecated: import("react-desc").PropTypesDescValidator;
40
+ };
41
+ interactionType: {
42
+ deprecated: import("react-desc").PropTypesDescValidator;
43
+ };
44
+ triggerComponent: import("react-desc").PropTypesDescValidator;
45
+ isOpen: {
46
+ deprecated: import("react-desc").PropTypesDescValidator;
47
+ };
48
+ onOpen: {
49
+ defaultValue<T = unknown>(arg: T): {
50
+ deprecated: import("react-desc").PropTypesDescValidator;
51
+ };
52
+ isRequired: import("react-desc").PropTypesDescValidator;
53
+ };
54
+ springAnimationComponent: {
55
+ defaultValue<T = unknown>(arg: T): {
56
+ deprecated: import("react-desc").PropTypesDescValidator;
57
+ };
58
+ isRequired: import("react-desc").PropTypesDescValidator;
59
+ };
60
+ showArrow: {
61
+ deprecated: import("react-desc").PropTypesDescValidator;
62
+ };
63
+ className: {
64
+ defaultValue<T = unknown>(arg: T): {
65
+ deprecated: import("react-desc").PropTypesDescValidator;
66
+ };
67
+ isRequired: import("react-desc").PropTypesDescValidator;
68
+ };
69
+ tooltipType: {
70
+ deprecated: import("react-desc").PropTypesDescValidator;
71
+ };
72
+ zIndex: {
73
+ deprecated: import("react-desc").PropTypesDescValidator;
74
+ };
75
+ innerRef: {
76
+ defaultValue<T = unknown>(arg: T): {
77
+ deprecated: import("react-desc").PropTypesDescValidator;
78
+ };
79
+ isRequired: import("react-desc").PropTypesDescValidator;
80
+ };
39
81
  };
40
82
  };
41
- declare const TooltipWithSchema: any;
83
+ declare const TooltipWithSchema: {
84
+ (props?: {
85
+ [x: string]: any;
86
+ containerProps?: {} | undefined;
87
+ innerRef: any;
88
+ placement?: string | undefined;
89
+ title?: string | undefined;
90
+ delayClose?: any;
91
+ delayOpen?: any;
92
+ interactionType?: string | undefined;
93
+ triggerComponent?: null | undefined;
94
+ className?: string | undefined;
95
+ isOpen?: undefined;
96
+ onOpen?: (() => null) | undefined;
97
+ springAnimationComponent?: undefined;
98
+ tooltipType?: string | undefined;
99
+ showArrow?: boolean | undefined;
100
+ zIndex: any;
101
+ } | undefined): JSX.Element;
102
+ propTypes: unknown;
103
+ toTypescript: () => import("react-desc").TypescriptSchema;
104
+ };
42
105
  export { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema };
43
106
  export default DSTooltip;
@@ -1,23 +1,70 @@
1
+ /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
1
2
  import React from 'react';
2
3
  import { DSTooltipT } from '.';
3
4
  declare const DSTooltipV2: {
4
5
  ({ containerProps, innerRef, placement, title, delayClose, delayOpen, triggerComponent, className, getIsOpen, onOpen, tooltipType, showArrow, offset, zIndex, extraModifiers, }: DSTooltipT): React.ReactElement;
5
6
  propTypes: {
6
- containerProps: any;
7
- placement: any;
8
- title: any;
9
- delayClose: any;
10
- delayOpen: any;
11
- triggerComponent: any;
12
- getIsOpen: any;
13
- onOpen: any;
14
- showArrow: any;
15
- className: any;
16
- tooltipType: any;
17
- zIndex: any;
18
- innerRef: any;
19
- offset: any;
7
+ containerProps: {
8
+ defaultValue<T = unknown>(arg: T): {
9
+ deprecated: import("react-desc").PropTypesDescValidator;
10
+ };
11
+ isRequired: import("react-desc").PropTypesDescValidator;
12
+ };
13
+ placement: {
14
+ deprecated: import("react-desc").PropTypesDescValidator;
15
+ };
16
+ title: import("react-desc").PropTypesDescValidator;
17
+ delayClose: {
18
+ deprecated: import("react-desc").PropTypesDescValidator;
19
+ };
20
+ delayOpen: {
21
+ deprecated: import("react-desc").PropTypesDescValidator;
22
+ };
23
+ triggerComponent: import("react-desc").PropTypesDescValidator;
24
+ getIsOpen: {
25
+ defaultValue<T = unknown>(arg: T): {
26
+ deprecated: import("react-desc").PropTypesDescValidator;
27
+ };
28
+ isRequired: import("react-desc").PropTypesDescValidator;
29
+ };
30
+ onOpen: {
31
+ defaultValue<T = unknown>(arg: T): {
32
+ deprecated: import("react-desc").PropTypesDescValidator;
33
+ };
34
+ isRequired: import("react-desc").PropTypesDescValidator;
35
+ };
36
+ showArrow: {
37
+ deprecated: import("react-desc").PropTypesDescValidator;
38
+ };
39
+ className: {
40
+ defaultValue<T = unknown>(arg: T): {
41
+ deprecated: import("react-desc").PropTypesDescValidator;
42
+ };
43
+ isRequired: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ tooltipType: {
46
+ deprecated: import("react-desc").PropTypesDescValidator;
47
+ };
48
+ zIndex: {
49
+ deprecated: import("react-desc").PropTypesDescValidator;
50
+ };
51
+ innerRef: {
52
+ defaultValue<T = unknown>(arg: T): {
53
+ deprecated: import("react-desc").PropTypesDescValidator;
54
+ };
55
+ isRequired: import("react-desc").PropTypesDescValidator;
56
+ };
57
+ offset: {
58
+ defaultValue<T = unknown>(arg: T): {
59
+ deprecated: import("react-desc").PropTypesDescValidator;
60
+ };
61
+ isRequired: import("react-desc").PropTypesDescValidator;
62
+ };
20
63
  };
21
64
  };
22
- declare const TooltipV2WithSchema: any;
65
+ declare const TooltipV2WithSchema: {
66
+ (props?: DSTooltipT | undefined): JSX.Element;
67
+ propTypes: unknown;
68
+ toTypescript: () => import("react-desc").TypescriptSchema;
69
+ };
23
70
  export { DSTooltipV2, TooltipV2WithSchema };