@elliemae/ds-tooltip 1.54.0-rc.9 → 1.55.0-next.12
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/cjs/index.js +9 -0
- package/cjs/index.js.map +1 -1
- package/cjs/v3/TooltipV3DatatestId.js +11 -0
- package/cjs/v3/TooltipV3DatatestId.js.map +1 -0
- package/cjs/v3/config/useWithDefaultProps.js +20 -0
- package/cjs/v3/config/useWithDefaultProps.js.map +1 -0
- package/cjs/v3/index.d.js +3 -0
- package/cjs/v3/index.d.js.map +1 -0
- package/cjs/v3/index.js +81 -0
- package/cjs/v3/index.js.map +1 -0
- package/cjs/v3/propsTypes.js +82 -0
- package/cjs/v3/propsTypes.js.map +1 -0
- package/cjs/v3/styleds.js +29 -0
- package/cjs/v3/styleds.js.map +1 -0
- package/esm/index.js +7 -0
- package/esm/index.js.map +1 -1
- package/esm/v3/TooltipV3DatatestId.js +7 -0
- package/esm/v3/TooltipV3DatatestId.js.map +1 -0
- package/esm/v3/config/useWithDefaultProps.js +16 -0
- package/esm/v3/config/useWithDefaultProps.js.map +1 -0
- package/esm/v3/index.d.js +2 -0
- package/esm/v3/index.d.js.map +1 -0
- package/esm/v3/index.js +68 -0
- package/esm/v3/index.js.map +1 -0
- package/esm/v3/propsTypes.js +78 -0
- package/esm/v3/propsTypes.js.map +1 -0
- package/esm/v3/styleds.js +20 -0
- package/esm/v3/styleds.js.map +1 -0
- package/package.json +6 -6
- package/v3/TooltipV3DatatestId/package.json +10 -0
- package/v3/config/useWithDefaultProps/package.json +10 -0
- package/v3/package.json +10 -0
- package/v3/propsTypes/package.json +10 -0
- package/v3/styleds/package.json +10 -0
package/cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var v1_DSTooltip = require('./v1/DSTooltip.js');
|
|
|
6
6
|
var v2_DSTooltip = require('./v2/DSTooltip.js');
|
|
7
7
|
var v2_utils_tooltipPositions = require('./v2/utils/tooltipPositions.js');
|
|
8
8
|
var v2_TooltipType = require('./v2/TooltipType.js');
|
|
9
|
+
var v3_index = require('./v3/index.js');
|
|
9
10
|
require('@babel/runtime/helpers/extends');
|
|
10
11
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
11
12
|
require('react');
|
|
@@ -28,6 +29,12 @@ require('@elliemae/ds-system');
|
|
|
28
29
|
require('./v2/DSTooltipArrow.js');
|
|
29
30
|
require('./v2/propTypes.js');
|
|
30
31
|
require('./v2/utils/setMultipleRefs.js');
|
|
32
|
+
require('@elliemae/ds-popperjs');
|
|
33
|
+
require('./v3/propsTypes.js');
|
|
34
|
+
require('./v3/config/useWithDefaultProps.js');
|
|
35
|
+
require('@elliemae/ds-props-helpers');
|
|
36
|
+
require('./v3/TooltipV3DatatestId.js');
|
|
37
|
+
require('./v3/styleds.js');
|
|
31
38
|
|
|
32
39
|
|
|
33
40
|
|
|
@@ -40,4 +47,6 @@ exports.DSTooltipV2 = v2_DSTooltip.DSTooltipV2;
|
|
|
40
47
|
exports.TooltipV2WithSchema = v2_DSTooltip.TooltipV2WithSchema;
|
|
41
48
|
exports.tooltipPositions = v2_utils_tooltipPositions.tooltipPositions;
|
|
42
49
|
exports.TooltipType = v2_TooltipType.TooltipType;
|
|
50
|
+
exports.DSTooltipV3 = v3_index.DSTooltipV3;
|
|
51
|
+
exports.DSTooltipV3WithSchema = v3_index.DSTooltipV3WithSchema;
|
|
43
52
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var TooltipV3DatatestId = {
|
|
6
|
+
TRIGGER_WRAPPER: 'ds-tooltip-v3-trigger-wrapper',
|
|
7
|
+
TOOLTIP_TEXT_WRAPPER: 'ds-tooltip-v3-tooltip-text-wrapper'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
exports.TooltipV3DatatestId = TooltipV3DatatestId;
|
|
11
|
+
//# sourceMappingURL=TooltipV3DatatestId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipV3DatatestId.js","sources":["../../../src/v3/TooltipV3DatatestId.tsx"],"sourcesContent":["export const TooltipV3DatatestId = {\n TRIGGER_WRAPPER: 'ds-tooltip-v3-trigger-wrapper',\n TOOLTIP_TEXT_WRAPPER: 'ds-tooltip-v3-tooltip-text-wrapper',\n};\n"],"names":["TooltipV3DatatestId","TRIGGER_WRAPPER","TOOLTIP_TEXT_WRAPPER"],"mappings":";;;;IAAaA,mBAAmB,GAAG;AACjCC,EAAAA,eAAe,EAAE,+BADgB;AAEjCC,EAAAA,oBAAoB,EAAE;AAFW;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
8
|
+
var noop = function noop() {};
|
|
9
|
+
|
|
10
|
+
var defaultProps = {
|
|
11
|
+
onOpen: noop,
|
|
12
|
+
onClose: noop,
|
|
13
|
+
id: ''
|
|
14
|
+
};
|
|
15
|
+
var useWithDefaultProps = function useWithDefaultProps(props) {
|
|
16
|
+
return dsPropsHelpers.useMemoMergePropsWithDefault(props, defaultProps);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.useWithDefaultProps = useWithDefaultProps;
|
|
20
|
+
//# sourceMappingURL=useWithDefaultProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWithDefaultProps.js","sources":["../../../../src/v3/config/useWithDefaultProps.ts"],"sourcesContent":["import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport type { TooltipV3PropsT } from '../index.d';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst defaultProps = {\n onOpen: noop,\n onClose: noop,\n id: '',\n};\n\nexport const useWithDefaultProps = (props: Partial<TooltipV3PropsT>): Partial<TooltipV3PropsT> =>\n useMemoMergePropsWithDefault(props, defaultProps);\n"],"names":["noop","defaultProps","onOpen","onClose","id","useWithDefaultProps","props","useMemoMergePropsWithDefault"],"mappings":";;;;;;AAGA;AACA,IAAMA,IAAI,GAAG,SAAPA,IAAO,GAAM,EAAnB;;AAEA,IAAMC,YAAY,GAAG;AACnBC,EAAAA,MAAM,EAAEF,IADW;AAEnBG,EAAAA,OAAO,EAAEH,IAFU;AAGnBI,EAAAA,EAAE,EAAE;AAHe,CAArB;IAMaC,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,KAAD;AAAA,SACjCC,2CAA4B,CAACD,KAAD,EAAQL,YAAR,CADK;AAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/cjs/v3/index.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
7
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var dsPopperjs = require('@elliemae/ds-popperjs');
|
|
10
|
+
var reactDesc = require('react-desc');
|
|
11
|
+
var v3_propsTypes = require('./propsTypes.js');
|
|
12
|
+
var v3_config_useWithDefaultProps = require('./config/useWithDefaultProps.js');
|
|
13
|
+
var v3_TooltipV3DatatestId = require('./TooltipV3DatatestId.js');
|
|
14
|
+
var v3_styleds = require('./styleds.js');
|
|
15
|
+
require('@elliemae/ds-props-helpers');
|
|
16
|
+
require('styled-components');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
21
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
22
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
+
|
|
25
|
+
var _excluded = ["text", "children", "onOpen", "onClose", "id"];
|
|
26
|
+
|
|
27
|
+
var DSTooltipV3 = function DSTooltipV3(props) {
|
|
28
|
+
var _useWithDefaultProps = v3_config_useWithDefaultProps.useWithDefaultProps(props),
|
|
29
|
+
text = _useWithDefaultProps.text,
|
|
30
|
+
children = _useWithDefaultProps.children,
|
|
31
|
+
onOpen = _useWithDefaultProps.onOpen,
|
|
32
|
+
onClose = _useWithDefaultProps.onClose,
|
|
33
|
+
id = _useWithDefaultProps.id,
|
|
34
|
+
extraPopperJsProps = _objectWithoutProperties__default['default'](_useWithDefaultProps, _excluded);
|
|
35
|
+
|
|
36
|
+
var _useState = React.useState(),
|
|
37
|
+
_useState2 = _slicedToArray__default['default'](_useState, 2),
|
|
38
|
+
referenceElement = _useState2[0],
|
|
39
|
+
setReferenceElement = _useState2[1];
|
|
40
|
+
|
|
41
|
+
var _useState3 = React.useState(false),
|
|
42
|
+
_useState4 = _slicedToArray__default['default'](_useState3, 2),
|
|
43
|
+
showPopover = _useState4[0],
|
|
44
|
+
setShowPopover = _useState4[1];
|
|
45
|
+
|
|
46
|
+
var showTooltip = React.useCallback(function () {
|
|
47
|
+
setShowPopover(true);
|
|
48
|
+
onOpen();
|
|
49
|
+
}, [onOpen]);
|
|
50
|
+
var hideTooltip = React.useCallback(function () {
|
|
51
|
+
setShowPopover(false);
|
|
52
|
+
onClose();
|
|
53
|
+
}, [onClose]);
|
|
54
|
+
var handleEscKey = React.useCallback(function (_ref) {
|
|
55
|
+
var key = _ref.key;
|
|
56
|
+
if (key === 'Escape') hideTooltip();
|
|
57
|
+
}, [hideTooltip]);
|
|
58
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(dsPopperjs.DSPopperJS, _extends__default['default']({
|
|
59
|
+
referenceElement: referenceElement,
|
|
60
|
+
showPopover: showPopover
|
|
61
|
+
}, extraPopperJsProps), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
62
|
+
"data-testid": "".concat(v3_TooltipV3DatatestId.TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
|
|
63
|
+
}, /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledTooltipContainer, null, /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledTooltipText, null, text)))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
64
|
+
onMouseOver: showTooltip,
|
|
65
|
+
onFocus: showTooltip,
|
|
66
|
+
onMouseOut: hideTooltip,
|
|
67
|
+
onBlur: hideTooltip,
|
|
68
|
+
onKeyDown: handleEscKey,
|
|
69
|
+
ref: setReferenceElement,
|
|
70
|
+
"data-testid": "".concat(v3_TooltipV3DatatestId.TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
|
|
71
|
+
}, children));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
DSTooltipV3.propTypes = v3_propsTypes.dsTooltipPropTypes;
|
|
75
|
+
var DSTooltipV3WithSchema = reactDesc.describe(DSTooltipV3).description('A tooltip component');
|
|
76
|
+
DSTooltipV3WithSchema.propTypes = v3_propsTypes.dsTooltipPropTypes;
|
|
77
|
+
|
|
78
|
+
exports.DSTooltipV3 = DSTooltipV3;
|
|
79
|
+
exports.DSTooltipV3WithSchema = DSTooltipV3WithSchema;
|
|
80
|
+
exports['default'] = DSTooltipV3;
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/v3/index.tsx"],"sourcesContent":["import React, { useState, useCallback } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { describe } from 'react-desc';\n\nimport { dsTooltipPropTypes } from './propsTypes';\nimport { useWithDefaultProps } from './config/useWithDefaultProps';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId';\nimport { StyledTooltipContainer, StyledTooltipText } from './styleds';\nimport type { TooltipV3PropsT } from './index.d';\n\nconst DSTooltipV3: React.ComponentType<TooltipV3PropsT> = (props) => {\n const { text, children, onOpen, onClose, id, ...extraPopperJsProps } = useWithDefaultProps(props);\n\n const [referenceElement, setReferenceElement] = useState<HTMLDivElement>();\n const [showPopover, setShowPopover] = useState(false);\n const showTooltip = useCallback(() => {\n setShowPopover(true);\n onOpen();\n }, [onOpen]);\n const hideTooltip = useCallback(() => {\n setShowPopover(false);\n onClose();\n }, [onClose]);\n const handleEscKey = useCallback(\n ({ key }) => {\n if (key === 'Escape') hideTooltip();\n },\n [hideTooltip],\n );\n\n return (\n <>\n <DSPopperJS referenceElement={referenceElement} showPopover={showPopover} {...extraPopperJsProps}>\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText>{text}</StyledTooltipText>\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n {/* The <div> element is catching the \"ESC\" key to close the tooltip, there is no valid aria role for this */}\n {/* eslint-disable-next-line max-len */}\n {/* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n onMouseOver={showTooltip}\n onFocus={showTooltip}\n onMouseOut={hideTooltip}\n onBlur={hideTooltip}\n onKeyDown={handleEscKey}\n ref={setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n {children}\n </div>\n </>\n );\n};\n\nDSTooltipV3.propTypes = dsTooltipPropTypes;\n\nconst DSTooltipV3WithSchema = describe(DSTooltipV3).description('A tooltip component');\nDSTooltipV3WithSchema.propTypes = dsTooltipPropTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\nexport default DSTooltipV3;\n"],"names":["DSTooltipV3","props","useWithDefaultProps","text","children","onOpen","onClose","id","extraPopperJsProps","useState","referenceElement","setReferenceElement","showPopover","setShowPopover","showTooltip","useCallback","hideTooltip","handleEscKey","key","React","DSPopperJS","TooltipV3DatatestId","TOOLTIP_TEXT_WRAPPER","StyledTooltipContainer","StyledTooltipText","TRIGGER_WRAPPER","propTypes","dsTooltipPropTypes","DSTooltipV3WithSchema","describe","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IAUMA,WAAiD,GAAG,SAApDA,WAAoD,CAACC,KAAD,EAAW;AACnE,6BAAuEC,iDAAmB,CAACD,KAAD,CAA1F;AAAA,MAAQE,IAAR,wBAAQA,IAAR;AAAA,MAAcC,QAAd,wBAAcA,QAAd;AAAA,MAAwBC,MAAxB,wBAAwBA,MAAxB;AAAA,MAAgCC,OAAhC,wBAAgCA,OAAhC;AAAA,MAAyCC,EAAzC,wBAAyCA,EAAzC;AAAA,MAAgDC,kBAAhD;;AAEA,kBAAgDC,cAAQ,EAAxD;AAAA;AAAA,MAAOC,gBAAP;AAAA,MAAyBC,mBAAzB;;AACA,mBAAsCF,cAAQ,CAAC,KAAD,CAA9C;AAAA;AAAA,MAAOG,WAAP;AAAA,MAAoBC,cAApB;;AACA,MAAMC,WAAW,GAAGC,iBAAW,CAAC,YAAM;AACpCF,IAAAA,cAAc,CAAC,IAAD,CAAd;AACAR,IAAAA,MAAM;AACP,GAH8B,EAG5B,CAACA,MAAD,CAH4B,CAA/B;AAIA,MAAMW,WAAW,GAAGD,iBAAW,CAAC,YAAM;AACpCF,IAAAA,cAAc,CAAC,KAAD,CAAd;AACAP,IAAAA,OAAO;AACR,GAH8B,EAG5B,CAACA,OAAD,CAH4B,CAA/B;AAIA,MAAMW,YAAY,GAAGF,iBAAW,CAC9B,gBAAa;AAAA,QAAVG,GAAU,QAAVA,GAAU;AACX,QAAIA,GAAG,KAAK,QAAZ,EAAsBF,WAAW;AAClC,GAH6B,EAI9B,CAACA,WAAD,CAJ8B,CAAhC;AAOA,sBACEG,+FACEA,wCAACC,qBAAD;AAAY,IAAA,gBAAgB,EAAEV,gBAA9B;AAAgD,IAAA,WAAW,EAAEE;AAA7D,KAA8EJ,kBAA9E,gBACEW;AAAK,6BAAgBE,0CAAmB,CAACC,oBAApC,SAA2Df,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAAlF;AAAL,kBACEY,wCAACI,iCAAD,qBACEJ,wCAACK,4BAAD,QAAoBrB,IAApB,CADF,CADF,CADF,CADF,eAYEgB;AACE,IAAA,WAAW,EAAEL,WADf;AAEE,IAAA,OAAO,EAAEA,WAFX;AAGE,IAAA,UAAU,EAAEE,WAHd;AAIE,IAAA,MAAM,EAAEA,WAJV;AAKE,IAAA,SAAS,EAAEC,YALb;AAME,IAAA,GAAG,EAAEN,mBANP;AAOE,6BAAgBU,0CAAmB,CAACI,eAApC,SAAsDlB,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAA7E;AAPF,KASGH,QATH,CAZF,CADF;AA0BD;;AAEDJ,WAAW,CAAC0B,SAAZ,GAAwBC,gCAAxB;IAEMC,qBAAqB,GAAGC,kBAAQ,CAAC7B,WAAD,CAAR,CAAsB8B,WAAtB,CAAkC,qBAAlC;AAC9BF,qBAAqB,CAACF,SAAtB,GAAkCC,gCAAlC;;;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
|
|
7
|
+
var dsTooltipPropTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* Tooltip text to be displayed on hover
|
|
10
|
+
*/
|
|
11
|
+
text: reactDesc.PropTypes.string.description('Tooltip text to be displayed on hover').isRequired,
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Element to tie the tooltip to, must be a single node
|
|
15
|
+
*/
|
|
16
|
+
children: reactDesc.PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Wheter or not the tooltip content should appear in a DOM portal or not
|
|
20
|
+
*/
|
|
21
|
+
withoutPortal: reactDesc.PropTypes.bool.description('Whether or not the tooltip content should appear in a DOM portal or not').defaultValue(true),
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Wheter or not the tooltip should use the arrow
|
|
25
|
+
*/
|
|
26
|
+
withoutArrow: reactDesc.PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Bounding element to calculate upon, defaults to it is "clippingParents",
|
|
30
|
+
* which are the scrolling containers that may cause the element to be partially or fully cut off.
|
|
31
|
+
*/
|
|
32
|
+
boundaryElement: reactDesc.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),
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* When using portal, the container in which to append the DOM content, defaults to document body
|
|
36
|
+
*/
|
|
37
|
+
portalDOMContainer: reactDesc.PropTypes.element.description('When using portal, the container in which to append the DOM content, defaults to document body').defaultValue(undefined),
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* start placement preferences, as per popperjs placement option
|
|
41
|
+
*/
|
|
42
|
+
startPlacementPreference: reactDesc.PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'top'"),
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Array of placement preferences, as per popperjs "flip" placement option
|
|
46
|
+
*/
|
|
47
|
+
placementOrderPreference: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'])).description('Array of placement preferences, as per popperjs "flip" placement option').defaultValue("['top', 'bottom', 'left', 'right']"),
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* tooltip wrapper z-index
|
|
51
|
+
*/
|
|
52
|
+
zIndex: reactDesc.PropTypes.number.description('popperjs content z-index').defaultValue(1),
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* placement offset array
|
|
56
|
+
*/
|
|
57
|
+
customOffset: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.number).description('placement offset array').defaultValue([0, 14]),
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* modifiers array for full-custom tooltip-js override
|
|
61
|
+
* https://tooltip.js.org/docs/v2/modifiers/
|
|
62
|
+
*/
|
|
63
|
+
modifiers: reactDesc.PropTypes.array.description('modifiers array for full-custom tooltip-js override, https://tooltip.js.org/docs/v2/modifiers/').defaultValue(1),
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Optional id appended to data-testid
|
|
67
|
+
*/
|
|
68
|
+
id: reactDesc.PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Optional callback to be invoked when the tooltip opens
|
|
72
|
+
*/
|
|
73
|
+
onOpen: reactDesc.PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 'Optional callback to be invoked when the tooltip closes
|
|
77
|
+
*/
|
|
78
|
+
onClose: reactDesc.PropTypes.func.description('Optional callback to be invoked when the tooltip closes').defaultValue('() => {}')
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
exports.dsTooltipPropTypes = dsTooltipPropTypes;
|
|
82
|
+
//# sourceMappingURL=propsTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propsTypes.js","sources":["../../../src/v3/propsTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const dsTooltipPropTypes = {\n /**\n * Tooltip text to be displayed on hover\n */\n text: PropTypes.string.description('Tooltip text to be displayed on hover').isRequired,\n /**\n * Element to tie the tooltip to, must be a single node\n */\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n /**\n * Wheter or not the tooltip content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the tooltip should use the arrow\n */\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\n boundaryElement: PropTypes.element\n .description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n )\n .defaultValue(undefined),\n /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.element\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\n placementOrderPreference: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ]),\n )\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * tooltip wrapper z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n /**\n * modifiers array for full-custom tooltip-js override\n * https://tooltip.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://tooltip.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n /**\n * Optional id appended to data-testid\n */\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n /**\n * Optional callback to be invoked when the tooltip opens\n */\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n /**\n * 'Optional callback to be invoked when the tooltip closes\n */\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n};\n"],"names":["dsTooltipPropTypes","text","PropTypes","string","description","isRequired","children","node","withoutPortal","bool","defaultValue","withoutArrow","boundaryElement","element","undefined","portalDOMContainer","startPlacementPreference","oneOf","placementOrderPreference","arrayOf","zIndex","number","customOffset","modifiers","array","id","onOpen","func","onClose"],"mappings":";;;;;;IAEaA,kBAAkB,GAAG;AAChC;AACF;AACA;AACEC,EAAAA,IAAI,EAAEC,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,uCAA7B,EAAsEC,UAJ5C;;AAKhC;AACF;AACA;AACEC,EAAAA,QAAQ,EAAEJ,mBAAS,CAACK,IAAV,CAAeH,WAAf,CAA2B,sDAA3B,EAAmFC,UAR7D;;AAShC;AACF;AACA;AACEG,EAAAA,aAAa,EAAEN,mBAAS,CAACO,IAAV,CACZL,WADY,CACA,yEADA,EAEZM,YAFY,CAEC,IAFD,CAZiB;;AAehC;AACF;AACA;AACEC,EAAAA,YAAY,EAAET,mBAAS,CAACO,IAAV,CAAeL,WAAf,CAA2B,iDAA3B,EAA8EM,YAA9E,CAA2F,KAA3F,CAlBkB;;AAmBhC;AACF;AACA;AACA;AACEE,EAAAA,eAAe,EAAEV,mBAAS,CAACW,OAAV,CACdT,WADc,CAEb,uEACE,4FAHW,EAKdM,YALc,CAKDI,SALC,CAvBe;;AA6BhC;AACF;AACA;AACEC,EAAAA,kBAAkB,EAAEb,mBAAS,CAACW,OAAV,CACjBT,WADiB,CACL,gGADK,EAEjBM,YAFiB,CAEJI,SAFI,CAhCY;;AAmChC;AACF;AACA;AACEE,EAAAA,wBAAwB,EAAEd,mBAAS,CAACe,KAAV,CAAgB,CACxC,WADwC,EAExC,KAFwC,EAGxC,SAHwC,EAIxC,aAJwC,EAKxC,OALwC,EAMxC,WANwC,EAOxC,YAPwC,EAQxC,QARwC,EASxC,cATwC,EAUxC,UAVwC,EAWxC,MAXwC,EAYxC,YAZwC,CAAhB,EAcvBb,WAduB,CAcX,+DAdW,EAevBM,YAfuB,CAeV,OAfU,CAtCM;;AAsDhC;AACF;AACA;AACEQ,EAAAA,wBAAwB,EAAEhB,mBAAS,CAACiB,OAAV,CACxBjB,mBAAS,CAACe,KAAV,CAAgB,CACd,WADc,EAEd,KAFc,EAGd,SAHc,EAId,aAJc,EAKd,OALc,EAMd,WANc,EAOd,YAPc,EAQd,QARc,EASd,cATc,EAUd,UAVc,EAWd,MAXc,EAYd,YAZc,CAAhB,CADwB,EAgBvBb,WAhBuB,CAgBX,yEAhBW,EAiBvBM,YAjBuB,CAiBV,oCAjBU,CAzDM;;AA2EhC;AACF;AACA;AACEU,EAAAA,MAAM,EAAElB,mBAAS,CAACmB,MAAV,CAAiBjB,WAAjB,CAA6B,0BAA7B,EAAyDM,YAAzD,CAAsE,CAAtE,CA9EwB;;AA+EhC;AACF;AACA;AACEY,EAAAA,YAAY,EAAEpB,mBAAS,CAACiB,OAAV,CAAkBjB,mBAAS,CAACmB,MAA5B,EAAoCjB,WAApC,CAAgD,wBAAhD,EAA0EM,YAA1E,CAAuF,CAAC,CAAD,EAAI,EAAJ,CAAvF,CAlFkB;;AAmFhC;AACF;AACA;AACA;AACEa,EAAAA,SAAS,EAAErB,mBAAS,CAACsB,KAAV,CACRpB,WADQ,CACI,gGADJ,EAERM,YAFQ,CAEK,CAFL,CAvFqB;;AA0FhC;AACF;AACA;AACEe,EAAAA,EAAE,EAAEvB,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,EAAoEM,YAApE,CAAiF,EAAjF,CA7F4B;;AA8FhC;AACF;AACA;AACEgB,EAAAA,MAAM,EAAExB,mBAAS,CAACyB,IAAV,CAAevB,WAAf,CAA2B,wDAA3B,EAAqFM,YAArF,CAAkG,UAAlG,CAjGwB;;AAkGhC;AACF;AACA;AACEkB,EAAAA,OAAO,EAAE1B,mBAAS,CAACyB,IAAV,CACNvB,WADM,CACM,yDADN,EAENM,YAFM,CAEO,UAFP;AArGuB;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
|
+
|
|
11
|
+
var StyledTooltipContainer = /*#__PURE__*/styled__default['default'].div.withConfig({
|
|
12
|
+
componentId: "sc-18a4gem-0"
|
|
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));transition:visibility 0.1s ease-in;"], function (_ref) {
|
|
14
|
+
var theme = _ref.theme;
|
|
15
|
+
return theme.space.l;
|
|
16
|
+
}, function (_ref2) {
|
|
17
|
+
var theme = _ref2.theme;
|
|
18
|
+
return "".concat(theme.space.xxxs, " ").concat(theme.space.xs);
|
|
19
|
+
}, function (_ref3) {
|
|
20
|
+
var theme = _ref3.theme;
|
|
21
|
+
return theme.colors.neutral[600];
|
|
22
|
+
});
|
|
23
|
+
var StyledTooltipText = /*#__PURE__*/styled__default['default'].div.withConfig({
|
|
24
|
+
componentId: "sc-18a4gem-1"
|
|
25
|
+
})(["white-space:normal;word-wrap:break-word;display:inline-block;"]);
|
|
26
|
+
|
|
27
|
+
exports.StyledTooltipContainer = StyledTooltipContainer;
|
|
28
|
+
exports.StyledTooltipText = StyledTooltipText;
|
|
29
|
+
//# sourceMappingURL=styleds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleds.js","sources":["../../../src/v3/styleds.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledTooltipContainer = styled.div`\n text-align: center;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n min-height: 24px;\n padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n font-size: 13px;\n color: ${({ theme }) => theme.colors.neutral[600]};\n box-shadow: 0 1px 5px 0 rgb(0 0 0 / 13%), 0 2px 4px 0 rgb(0 0 0 / 20%);\n filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));\n transition: visibility 0.1s ease-in;\n`;\n\nexport const StyledTooltipText = styled.div`\n white-space: normal;\n word-wrap: break-word;\n display: inline-block;\n`;\n"],"names":["StyledTooltipContainer","styled","div","theme","space","l","xxxs","xs","colors","neutral","StyledTooltipText"],"mappings":";;;;;;;;;;IAEaA,sBAAsB,gBAAGC,0BAAM,CAACC,GAAV;AAAA;AAAA,kUAEpB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,CAA3B;AAAA,CAFoB,EAKtB;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACC,KAAN,CAAYE,IAA9B,cAAsCH,KAAK,CAACC,KAAN,CAAYG,EAAlD;AAAA,CALsB,EAUxB;AAAA,MAAGJ,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACK,MAAN,CAAaC,OAAb,CAAqB,GAArB,CAAf;AAAA,CAVwB;IAgBtBC,iBAAiB,gBAAGT,0BAAM,CAACC,GAAV;AAAA;AAAA;;;;;"}
|
package/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema, DSTooltip
|
|
|
2
2
|
export { DSTooltipV2, TooltipV2WithSchema } from './v2/DSTooltip.js';
|
|
3
3
|
export { tooltipPositions } from './v2/utils/tooltipPositions.js';
|
|
4
4
|
export { TooltipType } from './v2/TooltipType.js';
|
|
5
|
+
export { DSTooltipV3, DSTooltipV3WithSchema } from './v3/index.js';
|
|
5
6
|
import '@babel/runtime/helpers/esm/extends';
|
|
6
7
|
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
7
8
|
import 'react';
|
|
@@ -24,4 +25,10 @@ import '@elliemae/ds-system';
|
|
|
24
25
|
import './v2/DSTooltipArrow.js';
|
|
25
26
|
import './v2/propTypes.js';
|
|
26
27
|
import './v2/utils/setMultipleRefs.js';
|
|
28
|
+
import '@elliemae/ds-popperjs';
|
|
29
|
+
import './v3/propsTypes.js';
|
|
30
|
+
import './v3/config/useWithDefaultProps.js';
|
|
31
|
+
import '@elliemae/ds-props-helpers';
|
|
32
|
+
import './v3/TooltipV3DatatestId.js';
|
|
33
|
+
import './v3/styleds.js';
|
|
27
34
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipV3DatatestId.js","sources":["../../../src/v3/TooltipV3DatatestId.tsx"],"sourcesContent":["export const TooltipV3DatatestId = {\n TRIGGER_WRAPPER: 'ds-tooltip-v3-trigger-wrapper',\n TOOLTIP_TEXT_WRAPPER: 'ds-tooltip-v3-tooltip-text-wrapper',\n};\n"],"names":["TooltipV3DatatestId","TRIGGER_WRAPPER","TOOLTIP_TEXT_WRAPPER"],"mappings":"IAAaA,mBAAmB,GAAG;AACjCC,EAAAA,eAAe,EAAE,+BADgB;AAEjCC,EAAAA,oBAAoB,EAAE;AAFW;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4
|
+
var noop = function noop() {};
|
|
5
|
+
|
|
6
|
+
var defaultProps = {
|
|
7
|
+
onOpen: noop,
|
|
8
|
+
onClose: noop,
|
|
9
|
+
id: ''
|
|
10
|
+
};
|
|
11
|
+
var useWithDefaultProps = function useWithDefaultProps(props) {
|
|
12
|
+
return useMemoMergePropsWithDefault(props, defaultProps);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { useWithDefaultProps };
|
|
16
|
+
//# sourceMappingURL=useWithDefaultProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWithDefaultProps.js","sources":["../../../../src/v3/config/useWithDefaultProps.ts"],"sourcesContent":["import { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport type { TooltipV3PropsT } from '../index.d';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst defaultProps = {\n onOpen: noop,\n onClose: noop,\n id: '',\n};\n\nexport const useWithDefaultProps = (props: Partial<TooltipV3PropsT>): Partial<TooltipV3PropsT> =>\n useMemoMergePropsWithDefault(props, defaultProps);\n"],"names":["noop","defaultProps","onOpen","onClose","id","useWithDefaultProps","props","useMemoMergePropsWithDefault"],"mappings":";;AAGA;AACA,IAAMA,IAAI,GAAG,SAAPA,IAAO,GAAM,EAAnB;;AAEA,IAAMC,YAAY,GAAG;AACnBC,EAAAA,MAAM,EAAEF,IADW;AAEnBG,EAAAA,OAAO,EAAEH,IAFU;AAGnBI,EAAAA,EAAE,EAAE;AAHe,CAArB;IAMaC,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,KAAD;AAAA,SACjCC,4BAA4B,CAACD,KAAD,EAAQL,YAAR,CADK;AAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/v3/index.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
|
+
import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import React, { useState, useCallback } from 'react';
|
|
5
|
+
import { DSPopperJS } from '@elliemae/ds-popperjs';
|
|
6
|
+
import { describe } from 'react-desc';
|
|
7
|
+
import { dsTooltipPropTypes } from './propsTypes.js';
|
|
8
|
+
import { useWithDefaultProps } from './config/useWithDefaultProps.js';
|
|
9
|
+
import { TooltipV3DatatestId } from './TooltipV3DatatestId.js';
|
|
10
|
+
import { StyledTooltipContainer, StyledTooltipText } from './styleds.js';
|
|
11
|
+
import '@elliemae/ds-props-helpers';
|
|
12
|
+
import 'styled-components';
|
|
13
|
+
|
|
14
|
+
var _excluded = ["text", "children", "onOpen", "onClose", "id"];
|
|
15
|
+
|
|
16
|
+
var DSTooltipV3 = function DSTooltipV3(props) {
|
|
17
|
+
var _useWithDefaultProps = useWithDefaultProps(props),
|
|
18
|
+
text = _useWithDefaultProps.text,
|
|
19
|
+
children = _useWithDefaultProps.children,
|
|
20
|
+
onOpen = _useWithDefaultProps.onOpen,
|
|
21
|
+
onClose = _useWithDefaultProps.onClose,
|
|
22
|
+
id = _useWithDefaultProps.id,
|
|
23
|
+
extraPopperJsProps = _objectWithoutProperties(_useWithDefaultProps, _excluded);
|
|
24
|
+
|
|
25
|
+
var _useState = useState(),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
referenceElement = _useState2[0],
|
|
28
|
+
setReferenceElement = _useState2[1];
|
|
29
|
+
|
|
30
|
+
var _useState3 = useState(false),
|
|
31
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
+
showPopover = _useState4[0],
|
|
33
|
+
setShowPopover = _useState4[1];
|
|
34
|
+
|
|
35
|
+
var showTooltip = useCallback(function () {
|
|
36
|
+
setShowPopover(true);
|
|
37
|
+
onOpen();
|
|
38
|
+
}, [onOpen]);
|
|
39
|
+
var hideTooltip = useCallback(function () {
|
|
40
|
+
setShowPopover(false);
|
|
41
|
+
onClose();
|
|
42
|
+
}, [onClose]);
|
|
43
|
+
var handleEscKey = useCallback(function (_ref) {
|
|
44
|
+
var key = _ref.key;
|
|
45
|
+
if (key === 'Escape') hideTooltip();
|
|
46
|
+
}, [hideTooltip]);
|
|
47
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DSPopperJS, _extends({
|
|
48
|
+
referenceElement: referenceElement,
|
|
49
|
+
showPopover: showPopover
|
|
50
|
+
}, extraPopperJsProps), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
"data-testid": "".concat(TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
|
|
52
|
+
}, /*#__PURE__*/React.createElement(StyledTooltipContainer, null, /*#__PURE__*/React.createElement(StyledTooltipText, null, text)))), /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
onMouseOver: showTooltip,
|
|
54
|
+
onFocus: showTooltip,
|
|
55
|
+
onMouseOut: hideTooltip,
|
|
56
|
+
onBlur: hideTooltip,
|
|
57
|
+
onKeyDown: handleEscKey,
|
|
58
|
+
ref: setReferenceElement,
|
|
59
|
+
"data-testid": "".concat(TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
|
|
60
|
+
}, children));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
DSTooltipV3.propTypes = dsTooltipPropTypes;
|
|
64
|
+
var DSTooltipV3WithSchema = describe(DSTooltipV3).description('A tooltip component');
|
|
65
|
+
DSTooltipV3WithSchema.propTypes = dsTooltipPropTypes;
|
|
66
|
+
|
|
67
|
+
export { DSTooltipV3, DSTooltipV3WithSchema, DSTooltipV3 as default };
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/v3/index.tsx"],"sourcesContent":["import React, { useState, useCallback } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { describe } from 'react-desc';\n\nimport { dsTooltipPropTypes } from './propsTypes';\nimport { useWithDefaultProps } from './config/useWithDefaultProps';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId';\nimport { StyledTooltipContainer, StyledTooltipText } from './styleds';\nimport type { TooltipV3PropsT } from './index.d';\n\nconst DSTooltipV3: React.ComponentType<TooltipV3PropsT> = (props) => {\n const { text, children, onOpen, onClose, id, ...extraPopperJsProps } = useWithDefaultProps(props);\n\n const [referenceElement, setReferenceElement] = useState<HTMLDivElement>();\n const [showPopover, setShowPopover] = useState(false);\n const showTooltip = useCallback(() => {\n setShowPopover(true);\n onOpen();\n }, [onOpen]);\n const hideTooltip = useCallback(() => {\n setShowPopover(false);\n onClose();\n }, [onClose]);\n const handleEscKey = useCallback(\n ({ key }) => {\n if (key === 'Escape') hideTooltip();\n },\n [hideTooltip],\n );\n\n return (\n <>\n <DSPopperJS referenceElement={referenceElement} showPopover={showPopover} {...extraPopperJsProps}>\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText>{text}</StyledTooltipText>\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n {/* The <div> element is catching the \"ESC\" key to close the tooltip, there is no valid aria role for this */}\n {/* eslint-disable-next-line max-len */}\n {/* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md#case-the-event-handler-is-only-being-used-to-capture-bubbled-events */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n onMouseOver={showTooltip}\n onFocus={showTooltip}\n onMouseOut={hideTooltip}\n onBlur={hideTooltip}\n onKeyDown={handleEscKey}\n ref={setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n {children}\n </div>\n </>\n );\n};\n\nDSTooltipV3.propTypes = dsTooltipPropTypes;\n\nconst DSTooltipV3WithSchema = describe(DSTooltipV3).description('A tooltip component');\nDSTooltipV3WithSchema.propTypes = dsTooltipPropTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\nexport default DSTooltipV3;\n"],"names":["DSTooltipV3","props","useWithDefaultProps","text","children","onOpen","onClose","id","extraPopperJsProps","useState","referenceElement","setReferenceElement","showPopover","setShowPopover","showTooltip","useCallback","hideTooltip","handleEscKey","key","TooltipV3DatatestId","TOOLTIP_TEXT_WRAPPER","TRIGGER_WRAPPER","propTypes","dsTooltipPropTypes","DSTooltipV3WithSchema","describe","description"],"mappings":";;;;;;;;;;;;;;;IAUMA,WAAiD,GAAG,SAApDA,WAAoD,CAACC,KAAD,EAAW;AACnE,6BAAuEC,mBAAmB,CAACD,KAAD,CAA1F;AAAA,MAAQE,IAAR,wBAAQA,IAAR;AAAA,MAAcC,QAAd,wBAAcA,QAAd;AAAA,MAAwBC,MAAxB,wBAAwBA,MAAxB;AAAA,MAAgCC,OAAhC,wBAAgCA,OAAhC;AAAA,MAAyCC,EAAzC,wBAAyCA,EAAzC;AAAA,MAAgDC,kBAAhD;;AAEA,kBAAgDC,QAAQ,EAAxD;AAAA;AAAA,MAAOC,gBAAP;AAAA,MAAyBC,mBAAzB;;AACA,mBAAsCF,QAAQ,CAAC,KAAD,CAA9C;AAAA;AAAA,MAAOG,WAAP;AAAA,MAAoBC,cAApB;;AACA,MAAMC,WAAW,GAAGC,WAAW,CAAC,YAAM;AACpCF,IAAAA,cAAc,CAAC,IAAD,CAAd;AACAR,IAAAA,MAAM;AACP,GAH8B,EAG5B,CAACA,MAAD,CAH4B,CAA/B;AAIA,MAAMW,WAAW,GAAGD,WAAW,CAAC,YAAM;AACpCF,IAAAA,cAAc,CAAC,KAAD,CAAd;AACAP,IAAAA,OAAO;AACR,GAH8B,EAG5B,CAACA,OAAD,CAH4B,CAA/B;AAIA,MAAMW,YAAY,GAAGF,WAAW,CAC9B,gBAAa;AAAA,QAAVG,GAAU,QAAVA,GAAU;AACX,QAAIA,GAAG,KAAK,QAAZ,EAAsBF,WAAW;AAClC,GAH6B,EAI9B,CAACA,WAAD,CAJ8B,CAAhC;AAOA,sBACE,uDACE,oBAAC,UAAD;AAAY,IAAA,gBAAgB,EAAEN,gBAA9B;AAAgD,IAAA,WAAW,EAAEE;AAA7D,KAA8EJ,kBAA9E,gBACE;AAAK,6BAAgBW,mBAAmB,CAACC,oBAApC,SAA2Db,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAAlF;AAAL,kBACE,oBAAC,sBAAD,qBACE,oBAAC,iBAAD,QAAoBJ,IAApB,CADF,CADF,CADF,CADF,eAYE;AACE,IAAA,WAAW,EAAEW,WADf;AAEE,IAAA,OAAO,EAAEA,WAFX;AAGE,IAAA,UAAU,EAAEE,WAHd;AAIE,IAAA,MAAM,EAAEA,WAJV;AAKE,IAAA,SAAS,EAAEC,YALb;AAME,IAAA,GAAG,EAAEN,mBANP;AAOE,6BAAgBQ,mBAAmB,CAACE,eAApC,SAAsDd,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAA7E;AAPF,KASGH,QATH,CAZF,CADF;AA0BD;;AAEDJ,WAAW,CAACsB,SAAZ,GAAwBC,kBAAxB;IAEMC,qBAAqB,GAAGC,QAAQ,CAACzB,WAAD,CAAR,CAAsB0B,WAAtB,CAAkC,qBAAlC;AAC9BF,qBAAqB,CAACF,SAAtB,GAAkCC,kBAAlC;;;;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { PropTypes } from 'react-desc';
|
|
2
|
+
|
|
3
|
+
var dsTooltipPropTypes = {
|
|
4
|
+
/**
|
|
5
|
+
* Tooltip text to be displayed on hover
|
|
6
|
+
*/
|
|
7
|
+
text: PropTypes.string.description('Tooltip text to be displayed on hover').isRequired,
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Element to tie the tooltip to, must be a single node
|
|
11
|
+
*/
|
|
12
|
+
children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Wheter or not the tooltip content should appear in a DOM portal or not
|
|
16
|
+
*/
|
|
17
|
+
withoutPortal: PropTypes.bool.description('Whether or not the tooltip content should appear in a DOM portal or not').defaultValue(true),
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Wheter or not the tooltip should use the arrow
|
|
21
|
+
*/
|
|
22
|
+
withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Bounding element to calculate upon, defaults to it is "clippingParents",
|
|
26
|
+
* which are the scrolling containers that may cause the element to be partially or fully cut off.
|
|
27
|
+
*/
|
|
28
|
+
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
|
+
|
|
30
|
+
/**
|
|
31
|
+
* When using portal, the container in which to append the DOM content, defaults to document body
|
|
32
|
+
*/
|
|
33
|
+
portalDOMContainer: PropTypes.element.description('When using portal, the container in which to append the DOM content, defaults to document body').defaultValue(undefined),
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* start placement preferences, as per popperjs placement option
|
|
37
|
+
*/
|
|
38
|
+
startPlacementPreference: PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'top'"),
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Array of placement preferences, as per popperjs "flip" placement option
|
|
42
|
+
*/
|
|
43
|
+
placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'])).description('Array of placement preferences, as per popperjs "flip" placement option').defaultValue("['top', 'bottom', 'left', 'right']"),
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* tooltip wrapper z-index
|
|
47
|
+
*/
|
|
48
|
+
zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* placement offset array
|
|
52
|
+
*/
|
|
53
|
+
customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* modifiers array for full-custom tooltip-js override
|
|
57
|
+
* https://tooltip.js.org/docs/v2/modifiers/
|
|
58
|
+
*/
|
|
59
|
+
modifiers: PropTypes.array.description('modifiers array for full-custom tooltip-js override, https://tooltip.js.org/docs/v2/modifiers/').defaultValue(1),
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Optional id appended to data-testid
|
|
63
|
+
*/
|
|
64
|
+
id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Optional callback to be invoked when the tooltip opens
|
|
68
|
+
*/
|
|
69
|
+
onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 'Optional callback to be invoked when the tooltip closes
|
|
73
|
+
*/
|
|
74
|
+
onClose: PropTypes.func.description('Optional callback to be invoked when the tooltip closes').defaultValue('() => {}')
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export { dsTooltipPropTypes };
|
|
78
|
+
//# sourceMappingURL=propsTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propsTypes.js","sources":["../../../src/v3/propsTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const dsTooltipPropTypes = {\n /**\n * Tooltip text to be displayed on hover\n */\n text: PropTypes.string.description('Tooltip text to be displayed on hover').isRequired,\n /**\n * Element to tie the tooltip to, must be a single node\n */\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n /**\n * Wheter or not the tooltip content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the tooltip should use the arrow\n */\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\n boundaryElement: PropTypes.element\n .description(\n 'Bounding element to calculate upon, defaults to \"clippingParents\",' +\n 'which are the scrolling containers that may cause element to be partially or fully cut off',\n )\n .defaultValue(undefined),\n /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.element\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\n placementOrderPreference: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ]),\n )\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * tooltip wrapper z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n /**\n * modifiers array for full-custom tooltip-js override\n * https://tooltip.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://tooltip.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n /**\n * Optional id appended to data-testid\n */\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n /**\n * Optional callback to be invoked when the tooltip opens\n */\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n /**\n * 'Optional callback to be invoked when the tooltip closes\n */\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n};\n"],"names":["dsTooltipPropTypes","text","PropTypes","string","description","isRequired","children","node","withoutPortal","bool","defaultValue","withoutArrow","boundaryElement","element","undefined","portalDOMContainer","startPlacementPreference","oneOf","placementOrderPreference","arrayOf","zIndex","number","customOffset","modifiers","array","id","onOpen","func","onClose"],"mappings":";;IAEaA,kBAAkB,GAAG;AAChC;AACF;AACA;AACEC,EAAAA,IAAI,EAAEC,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,uCAA7B,EAAsEC,UAJ5C;;AAKhC;AACF;AACA;AACEC,EAAAA,QAAQ,EAAEJ,SAAS,CAACK,IAAV,CAAeH,WAAf,CAA2B,sDAA3B,EAAmFC,UAR7D;;AAShC;AACF;AACA;AACEG,EAAAA,aAAa,EAAEN,SAAS,CAACO,IAAV,CACZL,WADY,CACA,yEADA,EAEZM,YAFY,CAEC,IAFD,CAZiB;;AAehC;AACF;AACA;AACEC,EAAAA,YAAY,EAAET,SAAS,CAACO,IAAV,CAAeL,WAAf,CAA2B,iDAA3B,EAA8EM,YAA9E,CAA2F,KAA3F,CAlBkB;;AAmBhC;AACF;AACA;AACA;AACEE,EAAAA,eAAe,EAAEV,SAAS,CAACW,OAAV,CACdT,WADc,CAEb,uEACE,4FAHW,EAKdM,YALc,CAKDI,SALC,CAvBe;;AA6BhC;AACF;AACA;AACEC,EAAAA,kBAAkB,EAAEb,SAAS,CAACW,OAAV,CACjBT,WADiB,CACL,gGADK,EAEjBM,YAFiB,CAEJI,SAFI,CAhCY;;AAmChC;AACF;AACA;AACEE,EAAAA,wBAAwB,EAAEd,SAAS,CAACe,KAAV,CAAgB,CACxC,WADwC,EAExC,KAFwC,EAGxC,SAHwC,EAIxC,aAJwC,EAKxC,OALwC,EAMxC,WANwC,EAOxC,YAPwC,EAQxC,QARwC,EASxC,cATwC,EAUxC,UAVwC,EAWxC,MAXwC,EAYxC,YAZwC,CAAhB,EAcvBb,WAduB,CAcX,+DAdW,EAevBM,YAfuB,CAeV,OAfU,CAtCM;;AAsDhC;AACF;AACA;AACEQ,EAAAA,wBAAwB,EAAEhB,SAAS,CAACiB,OAAV,CACxBjB,SAAS,CAACe,KAAV,CAAgB,CACd,WADc,EAEd,KAFc,EAGd,SAHc,EAId,aAJc,EAKd,OALc,EAMd,WANc,EAOd,YAPc,EAQd,QARc,EASd,cATc,EAUd,UAVc,EAWd,MAXc,EAYd,YAZc,CAAhB,CADwB,EAgBvBb,WAhBuB,CAgBX,yEAhBW,EAiBvBM,YAjBuB,CAiBV,oCAjBU,CAzDM;;AA2EhC;AACF;AACA;AACEU,EAAAA,MAAM,EAAElB,SAAS,CAACmB,MAAV,CAAiBjB,WAAjB,CAA6B,0BAA7B,EAAyDM,YAAzD,CAAsE,CAAtE,CA9EwB;;AA+EhC;AACF;AACA;AACEY,EAAAA,YAAY,EAAEpB,SAAS,CAACiB,OAAV,CAAkBjB,SAAS,CAACmB,MAA5B,EAAoCjB,WAApC,CAAgD,wBAAhD,EAA0EM,YAA1E,CAAuF,CAAC,CAAD,EAAI,EAAJ,CAAvF,CAlFkB;;AAmFhC;AACF;AACA;AACA;AACEa,EAAAA,SAAS,EAAErB,SAAS,CAACsB,KAAV,CACRpB,WADQ,CACI,gGADJ,EAERM,YAFQ,CAEK,CAFL,CAvFqB;;AA0FhC;AACF;AACA;AACEe,EAAAA,EAAE,EAAEvB,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,EAAoEM,YAApE,CAAiF,EAAjF,CA7F4B;;AA8FhC;AACF;AACA;AACEgB,EAAAA,MAAM,EAAExB,SAAS,CAACyB,IAAV,CAAevB,WAAf,CAA2B,wDAA3B,EAAqFM,YAArF,CAAkG,UAAlG,CAjGwB;;AAkGhC;AACF;AACA;AACEkB,EAAAA,OAAO,EAAE1B,SAAS,CAACyB,IAAV,CACNvB,WADM,CACM,yDADN,EAENM,YAFM,CAEO,UAFP;AArGuB;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
var StyledTooltipContainer = /*#__PURE__*/styled.div.withConfig({
|
|
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;"], function (_ref) {
|
|
6
|
+
var theme = _ref.theme;
|
|
7
|
+
return theme.space.l;
|
|
8
|
+
}, function (_ref2) {
|
|
9
|
+
var theme = _ref2.theme;
|
|
10
|
+
return "".concat(theme.space.xxxs, " ").concat(theme.space.xs);
|
|
11
|
+
}, function (_ref3) {
|
|
12
|
+
var theme = _ref3.theme;
|
|
13
|
+
return theme.colors.neutral[600];
|
|
14
|
+
});
|
|
15
|
+
var StyledTooltipText = /*#__PURE__*/styled.div.withConfig({
|
|
16
|
+
componentId: "sc-18a4gem-1"
|
|
17
|
+
})(["white-space:normal;word-wrap:break-word;display:inline-block;"]);
|
|
18
|
+
|
|
19
|
+
export { StyledTooltipContainer, StyledTooltipText };
|
|
20
|
+
//# sourceMappingURL=styleds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleds.js","sources":["../../../src/v3/styleds.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledTooltipContainer = styled.div`\n text-align: center;\n min-width: ${({ theme }) => theme.space.l};\n max-width: 250px;\n min-height: 24px;\n padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xs}`};\n position: relative;\n background-color: white;\n border-radius: 2px;\n font-size: 13px;\n color: ${({ theme }) => theme.colors.neutral[600]};\n box-shadow: 0 1px 5px 0 rgb(0 0 0 / 13%), 0 2px 4px 0 rgb(0 0 0 / 20%);\n filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));\n transition: visibility 0.1s ease-in;\n`;\n\nexport const StyledTooltipText = styled.div`\n white-space: normal;\n word-wrap: break-word;\n display: inline-block;\n`;\n"],"names":["StyledTooltipContainer","styled","div","theme","space","l","xxxs","xs","colors","neutral","StyledTooltipText"],"mappings":";;IAEaA,sBAAsB,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA,kUAEpB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,CAA3B;AAAA,CAFoB,EAKtB;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACC,KAAN,CAAYE,IAA9B,cAAsCH,KAAK,CAACC,KAAN,CAAYG,EAAlD;AAAA,CALsB,EAUxB;AAAA,MAAGJ,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACK,MAAN,CAAaC,OAAb,CAAqB,GAArB,CAAf;AAAA,CAVwB;IAgBtBC,iBAAiB,gBAAGT,MAAM,CAACC,GAAV;AAAA;AAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-tooltip",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.55.0-next.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Tooltip",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"build": "node ../../scripts/build/build.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-classnames": "1.
|
|
20
|
-
"@elliemae/ds-popper": "1.
|
|
21
|
-
"@elliemae/ds-shared": "1.
|
|
22
|
-
"@elliemae/ds-system": "1.
|
|
23
|
-
"@elliemae/ds-utilities": "1.
|
|
19
|
+
"@elliemae/ds-classnames": "1.55.0-next.12",
|
|
20
|
+
"@elliemae/ds-popper": "1.55.0-next.12",
|
|
21
|
+
"@elliemae/ds-shared": "1.55.0-next.12",
|
|
22
|
+
"@elliemae/ds-system": "1.55.0-next.12",
|
|
23
|
+
"@elliemae/ds-utilities": "1.55.0-next.12",
|
|
24
24
|
"@popperjs/core": "2.9.2",
|
|
25
25
|
"react-desc": "^4.1.2",
|
|
26
26
|
"react-popper": "2.2.5"
|
package/v3/package.json
ADDED