@elliemae/ds-tooltip 1.57.2 → 1.58.0-rc.2

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/v3/index.js CHANGED
@@ -105,11 +105,13 @@ var DSTooltipV3 = function DSTooltipV3(props) {
105
105
  if (key === 'Escape') hideTooltip();
106
106
  }, [hideTooltip]);
107
107
  useGlobalKeyboardListener(handleEscKey);
108
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", {
108
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledTriggerWrapper, {
109
109
  onMouseEnter: onMouseEnter,
110
110
  onMouseLeave: onMouseLeave,
111
111
  onFocus: onFocus,
112
- onBlur: onBlur
112
+ onBlur: onBlur,
113
+ ref: setReferenceElement,
114
+ "data-testid": "".concat(v3_TooltipV3DatatestId.TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
113
115
  }, /*#__PURE__*/React__default['default'].createElement(dsPopperjs.DSPopperJS, _extends__default['default']({
114
116
  referenceElement: referenceElement,
115
117
  showPopover: showPopover,
@@ -118,10 +120,7 @@ var DSTooltipV3 = function DSTooltipV3(props) {
118
120
  "data-testid": "".concat(v3_TooltipV3DatatestId.TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
119
121
  }, /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledTooltipContainer, null, /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledTooltipText, {
120
122
  textAlign: textAlign
121
- }, text), /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledMouseOverDetectionBox, null)))), /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledTriggerWrapper, {
122
- ref: setReferenceElement,
123
- "data-testid": "".concat(v3_TooltipV3DatatestId.TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
124
- }, children)));
123
+ }, text), /*#__PURE__*/React__default['default'].createElement(v3_styleds.StyledMouseOverDetectionBox, null)))), children));
125
124
  };
126
125
 
127
126
  DSTooltipV3.propTypes = v3_propsTypes.dsTooltipPropTypes;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/v3/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } 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 {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styleds';\nimport type { TooltipV3PropsT } from './index.d';\n\nconst useGlobalKeyboardListener = (func) => {\n useEffect(() => {\n document.addEventListener('keydown', func);\n return () => document.removeEventListener('keydown', func);\n }, [func]);\n};\n\nconst DSTooltipV3: React.ComponentType<TooltipV3PropsT> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, ...extraPopperJsProps } = useWithDefaultProps(props);\n\n const [isFocused, setIsFocused] = useState(false);\n const [isHover, setIsHover] = useState(false);\n const [latestOpenInteraction, setLatestOpenInteraction] = useState('');\n\n const [referenceElement, setReferenceElement] = useState<HTMLSpanElement>();\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\n const onFocus = useCallback(() => {\n setIsFocused(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onFocus');\n }\n }, [showPopover, showTooltip]);\n const onBlur = useCallback(() => {\n setIsFocused(false);\n if (!isHover || latestOpenInteraction === 'onFocus') hideTooltip();\n }, [hideTooltip, isHover, latestOpenInteraction]);\n\n const onMouseEnter = useCallback(() => {\n setIsHover(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onMouseEnter');\n }\n }, [showPopover, showTooltip]);\n const onMouseLeave = useCallback(() => {\n setIsHover(false);\n if (!isFocused || latestOpenInteraction === 'onMouseEnter') hideTooltip();\n }, [hideTooltip, isFocused, latestOpenInteraction]);\n\n const handleEscKey = useCallback(\n ({ key }) => {\n if (key === 'Escape') hideTooltip();\n },\n [hideTooltip],\n );\n\n useGlobalKeyboardListener(handleEscKey);\n\n return (\n <>\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 <span onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} onFocus={onFocus} onBlur={onBlur}>\n <DSPopperJS referenceElement={referenceElement} showPopover={showPopover} withoutPortal {...extraPopperJsProps}>\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText textAlign={textAlign}>{text}</StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n <StyledTriggerWrapper\n ref={setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n {children}\n </StyledTriggerWrapper>\n </span>\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":["useGlobalKeyboardListener","func","useEffect","document","addEventListener","removeEventListener","DSTooltipV3","props","useWithDefaultProps","text","children","onOpen","onClose","id","textAlign","extraPopperJsProps","useState","isFocused","setIsFocused","isHover","setIsHover","latestOpenInteraction","setLatestOpenInteraction","referenceElement","setReferenceElement","showPopover","setShowPopover","showTooltip","useCallback","hideTooltip","onFocus","onBlur","onMouseEnter","onMouseLeave","handleEscKey","key","React","DSPopperJS","TooltipV3DatatestId","TOOLTIP_TEXT_WRAPPER","StyledTooltipContainer","StyledTooltipText","StyledMouseOverDetectionBox","StyledTriggerWrapper","TRIGGER_WRAPPER","propTypes","dsTooltipPropTypes","DSTooltipV3WithSchema","describe","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,IAAD,EAAU;AAC1CC,EAAAA,eAAS,CAAC,YAAM;AACdC,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,SAA1B,EAAqCH,IAArC;AACA,WAAO;AAAA,aAAME,QAAQ,CAACE,mBAAT,CAA6B,SAA7B,EAAwCJ,IAAxC,CAAN;AAAA,KAAP;AACD,GAHQ,EAGN,CAACA,IAAD,CAHM,CAAT;AAID,CALD;;IAOMK,WAAiD,GAAG,SAApDA,WAAoD,CAACC,KAAD,EAAW;AACnE,6BAAkFC,iDAAmB,CAACD,KAAD,CAArG;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,MAA6CC,SAA7C,wBAA6CA,SAA7C;AAAA,MAA2DC,kBAA3D;;AAEA,kBAAkCC,cAAQ,CAAC,KAAD,CAA1C;AAAA;AAAA,MAAOC,SAAP;AAAA,MAAkBC,YAAlB;;AACA,mBAA8BF,cAAQ,CAAC,K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,EAA7E;AAFF,KAIGH,QAJH,CATF,CALF,CADF;AAwBD;;AAEDJ,WAAW,CAACuC,SAAZ,GAAwBC,gCAAxB;IAEMC,qBAAqB,GAAGC,kBAAQ,CAAC1C,WAAD,CAAR,CAAsB2C,WAAtB,CAAkC,qBAAlC;AAC9BF,qBAAqB,CAACF,SAAtB,GAAkCC,gCAAlC;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/v3/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } 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 {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styleds';\nimport type { TooltipV3PropsT } from './index.d';\n\nconst useGlobalKeyboardListener = (func) => {\n useEffect(() => {\n document.addEventListener('keydown', func);\n return () => document.removeEventListener('keydown', func);\n }, [func]);\n};\n\nconst DSTooltipV3: React.ComponentType<TooltipV3PropsT> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, ...extraPopperJsProps } = useWithDefaultProps(props);\n\n const [isFocused, setIsFocused] = useState(false);\n const [isHover, setIsHover] = useState(false);\n const [latestOpenInteraction, setLatestOpenInteraction] = useState('');\n\n const [referenceElement, setReferenceElement] = useState<HTMLSpanElement>();\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\n const onFocus = useCallback(() => {\n setIsFocused(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onFocus');\n }\n }, [showPopover, showTooltip]);\n const onBlur = useCallback(() => {\n setIsFocused(false);\n if (!isHover || latestOpenInteraction === 'onFocus') hideTooltip();\n }, [hideTooltip, isHover, latestOpenInteraction]);\n\n const onMouseEnter = useCallback(() => {\n setIsHover(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onMouseEnter');\n }\n }, [showPopover, showTooltip]);\n const onMouseLeave = useCallback(() => {\n setIsHover(false);\n if (!isFocused || latestOpenInteraction === 'onMouseEnter') hideTooltip();\n }, [hideTooltip, isFocused, latestOpenInteraction]);\n\n const handleEscKey = useCallback(\n ({ key }) => {\n if (key === 'Escape') hideTooltip();\n },\n [hideTooltip],\n );\n\n useGlobalKeyboardListener(handleEscKey);\n return (\n <>\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 <StyledTriggerWrapper\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n ref={setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <DSPopperJS referenceElement={referenceElement} showPopover={showPopover} withoutPortal {...extraPopperJsProps}>\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText textAlign={textAlign}>{text}</StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n\n {children}\n </StyledTriggerWrapper>\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":["useGlobalKeyboardListener","func","useEffect","document","addEventListener","removeEventListener","DSTooltipV3","props","useWithDefaultProps","text","children","onOpen","onClose","id","textAlign","extraPopperJsProps","useState","isFocused","setIsFocused","isHover","setIsHover","latestOpenInteraction","setLatestOpenInteraction","referenceElement","setReferenceElement","showPopover","setShowPopover","showTooltip","useCallback","hideTooltip","onFocus","onBlur","onMouseEnter","onMouseLeave","handleEscKey","key","React","StyledTriggerWrapper","TooltipV3DatatestId","TRIGGER_WRAPPER","DSPopperJS","TOOLTIP_TEXT_WRAPPER","StyledTooltipContainer","StyledTooltipText","StyledMouseOverDetectionBox","propTypes","dsTooltipPropTypes","DSTooltipV3WithSchema","describe","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,IAAD,EAAU;AAC1CC,EAAAA,eAAS,CAAC,YAAM;AACdC,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,SAA1B,EAAqCH,IAArC;AACA,WAAO;AAAA,aAAME,QAAQ,CAACE,mBAAT,CAA6B,SAA7B,EAAwCJ,IAAxC,CAAN;AAAA,KAAP;AACD,GAHQ,EAGN,CAACA,IAAD,CAHM,CAAT;AAID,CALD;;IAOMK,WAAiD,GAAG,SAApDA,WAAoD,CAACC,KAAD,EAAW;AACnE,6BAAkFC,iDAAmB,CAACD,KAAD,CAArG;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,MAA6CC,SAA7C,wBAA6CA,SAA7C;AAAA,MAA2DC,kBAA3D;;AAEA,kBAAkCC,cAAQ,CAAC,KAAD,CAA1C;AAAA;AAAA,MAAOC,SAAP;AAAA,MAAkBC,YAA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AACQ,sCAAD,OAFF,CADF,CADF,CARF,EAiBGlC,QAjBH,CALF,CADF;AA2BD;;AAEDJ,WAAW,CAACuC,SAAZ,GAAwBC,gCAAxB;IAEMC,qBAAqB,GAAGC,kBAAQ,CAAC1C,WAAD,CAAR,CAAsB2C,WAAtB,CAAkC,qBAAlC;AAC9BF,qBAAqB,CAACF,SAAtB,GAAkCC,gCAAlC;;;;;;"}
@@ -36,6 +36,16 @@ var dsTooltipPropTypes = {
36
36
  */
37
37
  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),
38
38
 
39
+ /**
40
+ * Whether or not the popper context menu should be animated
41
+ */
42
+ withoutAnimation: reactDesc.PropTypes.bool.description('Whether or not the popper context menu should be animated').defaultValue(false),
43
+
44
+ /**
45
+ * Popper context menus Animation duration in ms
46
+ */
47
+ animationDuration: reactDesc.PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),
48
+
39
49
  /**
40
50
  * When using portal, the container in which to append the DOM content, defaults to document body
41
51
  */
@@ -1 +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/focus\n */\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n /**\n * Tooltip text alignment\n */\n textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify', 'initial', 'inherit'])\n .description('Tooltip text alignment')\n .defaultValue('left'),\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","textAlign","oneOf","defaultValue","children","node","withoutPortal","bool","withoutArrow","boundaryElement","element","undefined","portalDOMContainer","startPlacementPreference","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,6CAA7B,EAA4EC,UAJlD;;AAKhC;AACF;AACA;AACEC,EAAAA,SAAS,EAAEJ,mBAAS,CAACK,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,QAAlB,EAA4B,SAA5B,EAAuC,SAAvC,EAAkD,SAAlD,CAAhB,EACRH,WADQ,CACI,wBADJ,EAERI,YAFQ,CAEK,MAFL,CARqB;;AAWhC;AACF;AACA;AACEC,EAAAA,QAAQ,EAAEP,mBAAS,CAACQ,IAAV,CAAeN,WAAf,CAA2B,sDAA3B,EAAmFC,UAd7D;;AAehC;AACF;AACA;AACEM,EAAAA,aAAa,EAAET,mBAAS,CAACU,IAAV,CACZR,WADY,CACA,yEADA,EAEZI,YAFY,CAEC,IAFD,CAlBiB;;AAqBhC;AACF;AACA;AACEK,EAAAA,YAAY,EAAEX,mBAAS,CAACU,IAAV,CAAeR,WAAf,CAA2B,iDAA3B,EAA8EI,YAA9E,CAA2F,KAA3F,CAxBkB;;AAyBhC;AACF;AACA;AACA;AACEM,EAAAA,eAAe,EAAEZ,mBAAS,CAACa,OAAV,CACdX,WADc,CAEb,uEACE,4FAHW,EAKdI,YALc,CAKDQ,SALC,CA7Be;;AAmChC;AACF;AACA;AACEC,EAAAA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EAAExB,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,EAAoEI,YAApE,CAAiF,EAAjF,CAnG4B;;AAoGhC;AACF;AACA;AACEmB,EAAAA,MAAM,EAAEzB,mBAAS,CAAC0B,IAAV,CAAexB,WAAf,CAA2B,wDAA3B,EAAqFI,YAArF,CAAkG,UAAlG,CAvGwB;;AAwGhC;AACF;AACA;AACEqB,EAAAA,OAAO,EAAE3B,mBAAS,CAAC0B,IAAV,CACNxB,WADM,CACM,yDADN,EAENI,YAFM,CAEO,UAFP;AA3GuB;;;;"}
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/focus\n */\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n /**\n * Tooltip text alignment\n */\n textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify', 'initial', 'inherit'])\n .description('Tooltip text alignment')\n .defaultValue('left'),\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 * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\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","textAlign","oneOf","defaultValue","children","node","withoutPortal","bool","withoutArrow","boundaryElement","element","undefined","withoutAnimation","animationDuration","number","portalDOMContainer","startPlacementPreference","placementOrderPreference","arrayOf","zIndex","customOffset","modifiers","array","id","onOpen","func","onClose"],"mappings":";;;;;;IAEaA,kBAAkB,GAAG;AAChC;AACF;AACA;AACEC,EAAAA,IAAI,EAAEC,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,6CAA7B,EAA4EC,UAJlD;;AAKhC;AACF;AACA;AACEC,EAAAA,SAAS,EAAEJ,mBAAS,CAACK,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,QAAlB,EAA4B,SAA5B,EAAuC,SAAvC,EAAkD,SAAlD,CAAhB,EACRH,WADQ,CACI,wBADJ,EAERI,YAFQ,CAEK,MAFL,CARqB;;AAWhC;AACF;AACA;AACEC,EAAAA,QAAQ,EAAEP,mBAAS,CAACQ,IAAV,CAAeN,WAAf,CAA2B,sDAA3B,EAAmFC,UAd7D;;AAehC;AACF;AACA;AACEM,EAAAA,aAAa,EAAET,mBAAS,CAACU,IAAV,CACZR,WADY,CACA,yEADA,EAEZI,YAFY,CAEC,IAFD,CAlBiB;;AAqBhC;AACF;AACA;AACEK,EAAAA,YAAY,EAAEX,mBAAS,CAACU,IAAV,CAAeR,WAAf,CAA2B,iDAA3B,EAA8EI,YAA9E,CAA2F,KAA3F,CAxBkB;;AAyBhC;AACF;AACA;AACA;AACEM,EAAAA,eAAe,EAAEZ,mBAAS,CAACa,OAAV,CACdX,WADc,CAEb,uEACE,4FAHW,EAKdI,YALc,CAKDQ,SALC,CA7Be;;AAmChC;AACF;AACA;AACEC,EAAAA,gBAAgB,EAAEf,mBAAS,CAACU,IAAV,CACfR,WADe,CACH,2DADG,EAEfI,YAFe,CAEF,KAFE,CAtCc;;AAyChC;AACF;AACA;AACEU,EAAAA,iBAAiB,EAAEhB,mBAAS,CAACiB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CAACyB,KAAV,CACRvB,WADQ,CACI,gGADJ,EAERI,YAFQ,CAEK,CAFL,CAvGqB;;AA0GhC;AACF;AACA;AACEoB,EAAAA,EAAE,EAAE1B,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,EAAoEI,YAApE,CAAiF,EAAjF,CA7G4B;;AA8GhC;AACF;AACA;AACEqB,EAAAA,MAAM,EAAE3B,mBAAS,CAAC4B,IAAV,CAAe1B,WAAf,CAA2B,wDAA3B,EAAqFI,YAArF,CAAkG,UAAlG,CAjHwB;;AAkHhC;AACF;AACA;AACEuB,EAAAA,OAAO,EAAE7B,mBAAS,CAAC4B,IAAV,CACN1B,WADM,CACM,yDADN,EAENI,YAFM,CAEO,UAFP;AArHuB;;;;"}
package/cjs/v3/styleds.js CHANGED
@@ -10,7 +10,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
10
10
 
11
11
  var StyledTooltipContainer = /*#__PURE__*/styled__default['default'].div.withConfig({
12
12
  componentId: "sc-18a4gem-0"
13
- })(["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:", ";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) {
13
+ })(["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:", ";"], function (_ref) {
14
14
  var theme = _ref.theme;
15
15
  return theme.space.l;
16
16
  }, function (_ref2) {
@@ -31,7 +31,7 @@ var StyledMouseOverDetectionBox = /*#__PURE__*/styled__default['default'].div.wi
31
31
  })(["position:absolute;top:-15px;right:-15px;width:calc(100% + 30px);height:calc(100% + 30px);z-index:-1;"]);
32
32
  var StyledTriggerWrapper = /*#__PURE__*/styled__default['default'].div.withConfig({
33
33
  componentId: "sc-18a4gem-3"
34
- })(["display:inline-block;"]);
34
+ })(["display:inline-block;width:100%;"]);
35
35
 
36
36
  exports.StyledMouseOverDetectionBox = StyledMouseOverDetectionBox;
37
37
  exports.StyledTooltipContainer = StyledTooltipContainer;
@@ -1 +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: 30px;\n display: grid;\n align-items: center;\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<{ textAlign: string }>`\n white-space: normal;\n word-wrap: break-word;\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n\nexport const StyledTriggerWrapper = styled.div`\n display: inline-block;\n`;\n"],"names":["StyledTooltipContainer","styled","div","theme","space","l","xxxs","xs","colors","neutral","StyledTooltipText","textAlign","StyledMouseOverDetectionBox","StyledTriggerWrapper"],"mappings":";;;;;;;;;;IAEaA,sBAAsB,gBAAGC,0BAAM,CAACC,GAAV;AAAA;AAAA,kWAEpB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,CAA3B;AAAA,CAFoB,EAOtB;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACC,KAAN,CAAYE,IAA9B,cAAsCH,KAAK,CAACC,KAAN,CAAYG,EAAlD;AAAA,CAPsB,EAYxB;AAAA,MAAGJ,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACK,MAAN,CAAaC,OAAb,CAAqB,GAArB,CAAf;AAAA,CAZwB;IAkBtBC,iBAAiB,gBAAGT,0BAAM,CAACC,GAAV;AAAA;AAAA,sFAId;AAAA,MAAGS,SAAH,SAAGA,SAAH;AAAA,SAAmBA,SAAnB;AAAA,CAJc;IAOjBC,2BAA2B,gBAAGX,0BAAM,CAACC,GAAV;AAAA;AAAA;IAS3BW,oBAAoB,gBAAGZ,0BAAM,CAACC,GAAV;AAAA;AAAA;;;;;;;"}
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: 30px;\n display: grid;\n align-items: center;\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`;\n\nexport const StyledTooltipText = styled.div<{ textAlign: string }>`\n white-space: normal;\n word-wrap: break-word;\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n\nexport const StyledTriggerWrapper = styled.div`\n display: inline-block;\n width: 100%;\n`;\n"],"names":["StyledTooltipContainer","styled","div","theme","space","l","xxxs","xs","colors","neutral","StyledTooltipText","textAlign","StyledMouseOverDetectionBox","StyledTriggerWrapper"],"mappings":";;;;;;;;;;IAEaA,sBAAsB,gBAAGC,0BAAM,CAACC,GAAV;AAAA;AAAA,4MAEpB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,CAA3B;AAAA,CAFoB,EAOtB;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACC,KAAN,CAAYE,IAA9B,cAAsCH,KAAK,CAACC,KAAN,CAAYG,EAAlD;AAAA,CAPsB,EAYxB;AAAA,MAAGJ,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACK,MAAN,CAAaC,OAAb,CAAqB,GAArB,CAAf;AAAA,CAZwB;IAetBC,iBAAiB,gBAAGT,0BAAM,CAACC,GAAV;AAAA;AAAA,sFAId;AAAA,MAAGS,SAAH,SAAGA,SAAH;AAAA,SAAmBA,SAAnB;AAAA,CAJc;IAOjBC,2BAA2B,gBAAGX,0BAAM,CAACC,GAAV;AAAA;AAAA;IAS3BW,oBAAoB,gBAAGZ,0BAAM,CAACC,GAAV;AAAA;AAAA;;;;;;;"}
package/esm/v3/index.js CHANGED
@@ -7,7 +7,7 @@ import { describe } from 'react-desc';
7
7
  import { dsTooltipPropTypes } from './propsTypes.js';
8
8
  import { useWithDefaultProps } from './config/useWithDefaultProps.js';
9
9
  import { TooltipV3DatatestId } from './TooltipV3DatatestId.js';
10
- import { StyledTooltipContainer, StyledTooltipText, StyledMouseOverDetectionBox, StyledTriggerWrapper } from './styleds.js';
10
+ import { StyledTriggerWrapper, StyledTooltipContainer, StyledTooltipText, StyledMouseOverDetectionBox } from './styleds.js';
11
11
  import '@elliemae/ds-props-helpers';
12
12
  import 'styled-components';
13
13
 
@@ -94,11 +94,13 @@ var DSTooltipV3 = function DSTooltipV3(props) {
94
94
  if (key === 'Escape') hideTooltip();
95
95
  }, [hideTooltip]);
96
96
  useGlobalKeyboardListener(handleEscKey);
97
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
97
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledTriggerWrapper, {
98
98
  onMouseEnter: onMouseEnter,
99
99
  onMouseLeave: onMouseLeave,
100
100
  onFocus: onFocus,
101
- onBlur: onBlur
101
+ onBlur: onBlur,
102
+ ref: setReferenceElement,
103
+ "data-testid": "".concat(TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
102
104
  }, /*#__PURE__*/React.createElement(DSPopperJS, _extends({
103
105
  referenceElement: referenceElement,
104
106
  showPopover: showPopover,
@@ -107,10 +109,7 @@ var DSTooltipV3 = function DSTooltipV3(props) {
107
109
  "data-testid": "".concat(TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
108
110
  }, /*#__PURE__*/React.createElement(StyledTooltipContainer, null, /*#__PURE__*/React.createElement(StyledTooltipText, {
109
111
  textAlign: textAlign
110
- }, text), /*#__PURE__*/React.createElement(StyledMouseOverDetectionBox, null)))), /*#__PURE__*/React.createElement(StyledTriggerWrapper, {
111
- ref: setReferenceElement,
112
- "data-testid": "".concat(TooltipV3DatatestId.TRIGGER_WRAPPER).concat(id !== '' ? "_".concat(id) : '')
113
- }, children)));
112
+ }, text), /*#__PURE__*/React.createElement(StyledMouseOverDetectionBox, null)))), children));
114
113
  };
115
114
 
116
115
  DSTooltipV3.propTypes = dsTooltipPropTypes;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/v3/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } 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 {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styleds';\nimport type { TooltipV3PropsT } from './index.d';\n\nconst useGlobalKeyboardListener = (func) => {\n useEffect(() => {\n document.addEventListener('keydown', func);\n return () => document.removeEventListener('keydown', func);\n }, [func]);\n};\n\nconst DSTooltipV3: React.ComponentType<TooltipV3PropsT> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, ...extraPopperJsProps } = useWithDefaultProps(props);\n\n const [isFocused, setIsFocused] = useState(false);\n const [isHover, setIsHover] = useState(false);\n const [latestOpenInteraction, setLatestOpenInteraction] = useState('');\n\n const [referenceElement, setReferenceElement] = useState<HTMLSpanElement>();\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\n const onFocus = useCallback(() => {\n setIsFocused(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onFocus');\n }\n }, [showPopover, showTooltip]);\n const onBlur = useCallback(() => {\n setIsFocused(false);\n if (!isHover || latestOpenInteraction === 'onFocus') hideTooltip();\n }, [hideTooltip, isHover, latestOpenInteraction]);\n\n const onMouseEnter = useCallback(() => {\n setIsHover(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onMouseEnter');\n }\n }, [showPopover, showTooltip]);\n const onMouseLeave = useCallback(() => {\n setIsHover(false);\n if (!isFocused || latestOpenInteraction === 'onMouseEnter') hideTooltip();\n }, [hideTooltip, isFocused, latestOpenInteraction]);\n\n const handleEscKey = useCallback(\n ({ key }) => {\n if (key === 'Escape') hideTooltip();\n },\n [hideTooltip],\n );\n\n useGlobalKeyboardListener(handleEscKey);\n\n return (\n <>\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 <span onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} onFocus={onFocus} onBlur={onBlur}>\n <DSPopperJS referenceElement={referenceElement} showPopover={showPopover} withoutPortal {...extraPopperJsProps}>\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText textAlign={textAlign}>{text}</StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n <StyledTriggerWrapper\n ref={setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n {children}\n </StyledTriggerWrapper>\n </span>\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":["useGlobalKeyboardListener","func","useEffect","document","addEventListener","removeEventListener","DSTooltipV3","props","useWithDefaultProps","text","children","onOpen","onClose","id","textAlign","extraPopperJsProps","useState","isFocused","setIsFocused","isHover","setIsHover","latestOpenInteraction","setLatestOpenInteraction","referenceElement","setReferenceElement","showPopover","setShowPopover","showTooltip","useCallback","hideTooltip","onFocus","onBlur","onMouseEnter","onMouseLeave","handleEscKey","key","TooltipV3DatatestId","TOOLTIP_TEXT_WRAPPER","TRIGGER_WRAPPER","propTypes","dsTooltipPropTypes","DSTooltipV3WithSchema","describe","description"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,IAAD,EAAU;AAC1CC,EAAAA,SAAS,CAAC,YAAM;AACdC,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,SAA1B,EAAqCH,IAArC;AACA,WAAO;AAAA,aAAME,QAAQ,CAACE,mBAAT,CAA6B,SAA7B,EAAwCJ,IAAxC,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BAAC,UAAD;AAAY,IAAA,gBAAgB,EAAER,gBAA9B;AAAgD,IAAA,WAAW,EAAEE,WAA7D;AAA0E,IAAA,aAAa;AAAvF,KAA4FV,kBAA5F,gBACE;AAAK,6BAAgBqB,mBAAmB,CAACC,oBAApC,SAA2DxB,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAAlF;AAAL,kBACE,oBAAC,sBAAD,qBACE,oBAAC,iBAAD;AAAmB,IAAA,SAAS,EAAEC;AAA9B,KAA0CL,IAA1C,CADF,eAEE,oBAAC,2BAAD,OAFF,CADF,CADF,CADF,eASE,oBAAC,oBAAD;AACE,IAAA,GAAG,EAAEe,mBADP;AAEE,6BAAgBY,mBAAmB,CAACE,eAApC,SAAsDzB,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAA7E;AAFF,KAIGH,QAJH,CATF,CALF,CADF;AAwBD;;AAEDJ,WAAW,CAACiC,SAAZ,GAAwBC,kBAAxB;IAEMC,qBAAqB,GAAGC,QAAQ,CAACpC,WAAD,CAAR,CAAsBqC,WAAtB,CAAkC,qBAAlC;AAC9BF,qBAAqB,CAACF,SAAtB,GAAkCC,kBAAlC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/v3/index.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { useState, useCallback, useEffect } 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 {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styleds';\nimport type { TooltipV3PropsT } from './index.d';\n\nconst useGlobalKeyboardListener = (func) => {\n useEffect(() => {\n document.addEventListener('keydown', func);\n return () => document.removeEventListener('keydown', func);\n }, [func]);\n};\n\nconst DSTooltipV3: React.ComponentType<TooltipV3PropsT> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, ...extraPopperJsProps } = useWithDefaultProps(props);\n\n const [isFocused, setIsFocused] = useState(false);\n const [isHover, setIsHover] = useState(false);\n const [latestOpenInteraction, setLatestOpenInteraction] = useState('');\n\n const [referenceElement, setReferenceElement] = useState<HTMLSpanElement>();\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\n const onFocus = useCallback(() => {\n setIsFocused(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onFocus');\n }\n }, [showPopover, showTooltip]);\n const onBlur = useCallback(() => {\n setIsFocused(false);\n if (!isHover || latestOpenInteraction === 'onFocus') hideTooltip();\n }, [hideTooltip, isHover, latestOpenInteraction]);\n\n const onMouseEnter = useCallback(() => {\n setIsHover(true);\n if (!showPopover) {\n showTooltip();\n setLatestOpenInteraction('onMouseEnter');\n }\n }, [showPopover, showTooltip]);\n const onMouseLeave = useCallback(() => {\n setIsHover(false);\n if (!isFocused || latestOpenInteraction === 'onMouseEnter') hideTooltip();\n }, [hideTooltip, isFocused, latestOpenInteraction]);\n\n const handleEscKey = useCallback(\n ({ key }) => {\n if (key === 'Escape') hideTooltip();\n },\n [hideTooltip],\n );\n\n useGlobalKeyboardListener(handleEscKey);\n return (\n <>\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 <StyledTriggerWrapper\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n ref={setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <DSPopperJS referenceElement={referenceElement} showPopover={showPopover} withoutPortal {...extraPopperJsProps}>\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText textAlign={textAlign}>{text}</StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n\n {children}\n </StyledTriggerWrapper>\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":["useGlobalKeyboardListener","func","useEffect","document","addEventListener","removeEventListener","DSTooltipV3","props","useWithDefaultProps","text","children","onOpen","onClose","id","textAlign","extraPopperJsProps","useState","isFocused","setIsFocused","isHover","setIsHover","latestOpenInteraction","setLatestOpenInteraction","referenceElement","setReferenceElement","showPopover","setShowPopover","showTooltip","useCallback","hideTooltip","onFocus","onBlur","onMouseEnter","onMouseLeave","handleEscKey","key","TooltipV3DatatestId","TRIGGER_WRAPPER","TOOLTIP_TEXT_WRAPPER","propTypes","dsTooltipPropTypes","DSTooltipV3WithSchema","describe","description"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,IAAD,EAAU;AAC1CC,EAAAA,SAAS,CAAC,YAAM;AACdC,IAAAA,QAAQ,CAACC,gBAAT,CAA0B,SAA1B,EAAqCH,IAArC;AACA,WAAO;AAAA,aAAME,QAAQ,CAACE,mBAAT,CAA6B,SAA7B,EAAwCJ,IAAxC,CAAN;AAAA,KAAP;AACD,GAHQ,EAGN,CAACA,IAAD,CAHM,CAAT;AAID,CALD;;IAOMK,WA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KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAA7E;AANF,kBAQE,oBAAC,UAAD;AAAY,IAAA,gBAAgB,EAAEU,gBAA9B;AAAgD,IAAA,WAAW,EAAEE,WAA7D;AAA0E,IAAA,aAAa;AAAvF,KAA4FV,kBAA5F,gBACE;AAAK,6BAAgBqB,mBAAmB,CAACE,oBAApC,SAA2DzB,EAAE,KAAK,EAAP,cAAgBA,EAAhB,IAAuB,EAAlF;AAAL,kBACE,oBAAC,sBAAD,qBACE,oBAAC,iBAAD;AAAmB,IAAA,SAAS,EAAEC;AAA9B,KAA0CL,IAA1C,CADF,eAEE,oBAAC,2BAAD,OAFF,CADF,CADF,CARF,EAiBGC,QAjBH,CALF,CADF;AA2BD;;AAEDJ,WAAW,CAACiC,SAAZ,GAAwBC,kBAAxB;IAEMC,qBAAqB,GAAGC,QAAQ,CAACpC,WAAD,CAAR,CAAsBqC,WAAtB,CAAkC,qBAAlC;AAC9BF,qBAAqB,CAACF,SAAtB,GAAkCC,kBAAlC;;;;"}
@@ -32,6 +32,16 @@ var dsTooltipPropTypes = {
32
32
  */
33
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),
34
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
+
35
45
  /**
36
46
  * When using portal, the container in which to append the DOM content, defaults to document body
37
47
  */
@@ -1 +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/focus\n */\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n /**\n * Tooltip text alignment\n */\n textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify', 'initial', 'inherit'])\n .description('Tooltip text alignment')\n .defaultValue('left'),\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","textAlign","oneOf","defaultValue","children","node","withoutPortal","bool","withoutArrow","boundaryElement","element","undefined","portalDOMContainer","startPlacementPreference","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,6CAA7B,EAA4EC,UAJlD;;AAKhC;AACF;AACA;AACEC,EAAAA,SAAS,EAAEJ,SAAS,CAACK,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,QAAlB,EAA4B,SAA5B,EAAuC,SAAvC,EAAkD,SAAlD,CAAhB,EACRH,WADQ,CACI,wBADJ,EAERI,YAFQ,CAEK,MAFL,CARqB;;AAWhC;AACF;AACA;AACEC,EAAAA,QAAQ,EAAEP,SAAS,CAACQ,IAAV,CAAeN,WAAf,CAA2B,sDAA3B,EAAmFC,UAd7D;;AAehC;AACF;AACA;AACEM,EAAAA,aAAa,EAAET,SAAS,CAACU,IAA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;AACEe,EAAAA,YAAY,EAAErB,SAAS,CAACkB,OAAV,CAAkBlB,SAAS,CAACoB,MAA5B,EAAoClB,WAApC,CAAgD,wBAAhD,EAA0EI,YAA1E,CAAuF,CAAC,CAAD,EAAI,EAAJ,CAAvF,CAxFkB;;AAyFhC;AACF;AACA;AACA;AACEgB,EAAAA,SAAS,EAAEtB,SAAS,CAACuB,KAAV,CACRrB,WADQ,CACI,gGADJ,EAERI,YAFQ,CAEK,CAFL,CA7FqB;;AAgGhC;AACF;AACA;AACEkB,EAAAA,EAAE,EAAExB,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,EAAoEI,YAApE,CAAiF,EAAjF,CAnG4B;;AAoGhC;AACF;AACA;AACEmB,EAAAA,MAAM,EAAEzB,SAAS,CAAC0B,IAAV,CAAexB,WAAf,CAA2B,wDAA3B,EAAqFI,YAArF,CAAkG,UAAlG,CAvGwB;;AAwGhC;AACF;AACA;AACEqB,EAAAA,OAAO,EAAE3B,SAAS,CAAC0B,IAAV,CACNxB,WADM,CACM,yDADN,EAENI,YAFM,CAEO,UAFP;AA3GuB;;;;"}
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/focus\n */\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n /**\n * Tooltip text alignment\n */\n textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify', 'initial', 'inherit'])\n .description('Tooltip text alignment')\n .defaultValue('left'),\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 * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\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","textAlign","oneOf","defaultValue","children","node","withoutPortal","bool","withoutArrow","boundaryElement","element","undefined","withoutAnimation","animationDuration","number","portalDOMContainer","startPlacementPreference","placementOrderPreference","arrayOf","zIndex","customOffset","modifiers","array","id","onOpen","func","onClose"],"mappings":";;IAEaA,kBAAkB,GAAG;AAChC;AACF;AACA;AACEC,EAAAA,IAAI,EAAEC,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,6CAA7B,EAA4EC,UAJlD;;AAKhC;AACF;AACA;AACEC,EAAAA,SAAS,EAAEJ,SAAS,CAACK,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,EAAkB,QAAlB,EAA4B,SAA5B,EAAuC,SAAvC,EAAkD,SAAlD,CAAhB,EACRH,WADQ,CACI,wBADJ,EAERI,YAFQ,CAEK,MAFL,CARqB;;AAWhC;AACF;AACA;AACEC,EAAAA,QAAQ,EAAEP,SAAS,CAACQ,IAAV,CAAeN,WAAf,CAA2B,sDAA3B,EAAmFC,UAd7D;;AAehC;AACF;AACA;AACEM,EAAAA,aAAa,EAAET,SAAS,CAACU,IAAV,CACZR,WADY,CACA,yEADA,EAEZI,YAFY,CAEC,IAFD,CAlBiB;;AAqBhC;AACF;AACA;AACEK,EAAAA,YAAY,EAAEX,SAAS,CAACU,IAAV,CAAeR,WAAf,CAA2B,iDAA3B,EAA8EI,YAA9E,CAA2F,KAA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Bf,WAAjB,CAA6B,0BAA7B,EAAyDI,YAAzD,CAAsE,CAAtE,CA9FwB;;AA+FhC;AACF;AACA;AACEiB,EAAAA,YAAY,EAAEvB,SAAS,CAACqB,OAAV,CAAkBrB,SAAS,CAACiB,MAA5B,EAAoCf,WAApC,CAAgD,wBAAhD,EAA0EI,YAA1E,CAAuF,CAAC,CAAD,EAAI,EAAJ,CAAvF,CAlGkB;;AAmGhC;AACF;AACA;AACA;AACEkB,EAAAA,SAAS,EAAExB,SAAS,CAACyB,KAAV,CACRvB,WADQ,CACI,gGADJ,EAERI,YAFQ,CAEK,CAFL,CAvGqB;;AA0GhC;AACF;AACA;AACEoB,EAAAA,EAAE,EAAE1B,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,qCAA7B,EAAoEI,YAApE,CAAiF,EAAjF,CA7G4B;;AA8GhC;AACF;AACA;AACEqB,EAAAA,MAAM,EAAE3B,SAAS,CAAC4B,IAAV,CAAe1B,WAAf,CAA2B,wDAA3B,EAAqFI,YAArF,CAAkG,UAAlG,CAjHwB;;AAkHhC;AACF;AACA;AACEuB,EAAAA,OAAO,EAAE7B,SAAS,CAAC4B,IAAV,CACN1B,WADM,CACM,yDADN,EAENI,YAFM,CAEO,UAFP;AArHuB;;;;"}
package/esm/v3/styleds.js CHANGED
@@ -2,7 +2,7 @@ import styled from 'styled-components';
2
2
 
3
3
  var StyledTooltipContainer = /*#__PURE__*/styled.div.withConfig({
4
4
  componentId: "sc-18a4gem-0"
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:", ";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) {
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:", ";"], function (_ref) {
6
6
  var theme = _ref.theme;
7
7
  return theme.space.l;
8
8
  }, function (_ref2) {
@@ -23,7 +23,7 @@ var StyledMouseOverDetectionBox = /*#__PURE__*/styled.div.withConfig({
23
23
  })(["position:absolute;top:-15px;right:-15px;width:calc(100% + 30px);height:calc(100% + 30px);z-index:-1;"]);
24
24
  var StyledTriggerWrapper = /*#__PURE__*/styled.div.withConfig({
25
25
  componentId: "sc-18a4gem-3"
26
- })(["display:inline-block;"]);
26
+ })(["display:inline-block;width:100%;"]);
27
27
 
28
28
  export { StyledMouseOverDetectionBox, StyledTooltipContainer, StyledTooltipText, StyledTriggerWrapper };
29
29
  //# sourceMappingURL=styleds.js.map
@@ -1 +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: 30px;\n display: grid;\n align-items: center;\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<{ textAlign: string }>`\n white-space: normal;\n word-wrap: break-word;\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n\nexport const StyledTriggerWrapper = styled.div`\n display: inline-block;\n`;\n"],"names":["StyledTooltipContainer","styled","div","theme","space","l","xxxs","xs","colors","neutral","StyledTooltipText","textAlign","StyledMouseOverDetectionBox","StyledTriggerWrapper"],"mappings":";;IAEaA,sBAAsB,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA,kWAEpB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,CAA3B;AAAA,CAFoB,EAOtB;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACC,KAAN,CAAYE,IAA9B,cAAsCH,KAAK,CAACC,KAAN,CAAYG,EAAlD;AAAA,CAPsB,EAYxB;AAAA,MAAGJ,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACK,MAAN,CAAaC,OAAb,CAAqB,GAArB,CAAf;AAAA,CAZwB;IAkBtBC,iBAAiB,gBAAGT,MAAM,CAACC,GAAV;AAAA;AAAA,sFAId;AAAA,MAAGS,SAAH,SAAGA,SAAH;AAAA,SAAmBA,SAAnB;AAAA,CAJc;IAOjBC,2BAA2B,gBAAGX,MAAM,CAACC,GAAV;AAAA;AAAA;IAS3BW,oBAAoB,gBAAGZ,MAAM,CAACC,GAAV;AAAA;AAAA;;;;"}
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: 30px;\n display: grid;\n align-items: center;\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`;\n\nexport const StyledTooltipText = styled.div<{ textAlign: string }>`\n white-space: normal;\n word-wrap: break-word;\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n\nexport const StyledTriggerWrapper = styled.div`\n display: inline-block;\n width: 100%;\n`;\n"],"names":["StyledTooltipContainer","styled","div","theme","space","l","xxxs","xs","colors","neutral","StyledTooltipText","textAlign","StyledMouseOverDetectionBox","StyledTriggerWrapper"],"mappings":";;IAEaA,sBAAsB,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA,4MAEpB;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,CAA3B;AAAA,CAFoB,EAOtB;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACC,KAAN,CAAYE,IAA9B,cAAsCH,KAAK,CAACC,KAAN,CAAYG,EAAlD;AAAA,CAPsB,EAYxB;AAAA,MAAGJ,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACK,MAAN,CAAaC,OAAb,CAAqB,GAArB,CAAf;AAAA,CAZwB;IAetBC,iBAAiB,gBAAGT,MAAM,CAACC,GAAV;AAAA;AAAA,sFAId;AAAA,MAAGS,SAAH,SAAGA,SAAH;AAAA,SAAmBA,SAAnB;AAAA,CAJc;IAOjBC,2BAA2B,gBAAGX,MAAM,CAACC,GAAV;AAAA;AAAA;IAS3BW,oBAAoB,gBAAGZ,MAAM,CAACC,GAAV;AAAA;AAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-tooltip",
3
- "version": "1.57.2",
3
+ "version": "1.58.0-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "Ellie Mae - Dim Sum - Tooltip",
6
6
  "module": "esm/index.js",
@@ -16,14 +16,14 @@
16
16
  "build": "node ../../scripts/build/build.js"
17
17
  },
18
18
  "dependencies": {
19
- "@elliemae/ds-basic": "1.57.2",
20
- "@elliemae/ds-classnames": "1.57.2",
21
- "@elliemae/ds-popper": "1.57.2",
22
- "@elliemae/ds-popperjs": "1.57.2",
23
- "@elliemae/ds-portal": "1.57.2",
24
- "@elliemae/ds-shared": "1.57.2",
25
- "@elliemae/ds-system": "1.57.2",
26
- "@elliemae/ds-utilities": "1.57.2",
19
+ "@elliemae/ds-basic": "1.58.0-rc.2",
20
+ "@elliemae/ds-classnames": "1.58.0-rc.2",
21
+ "@elliemae/ds-popper": "1.58.0-rc.2",
22
+ "@elliemae/ds-popperjs": "1.58.0-rc.2",
23
+ "@elliemae/ds-portal": "1.58.0-rc.2",
24
+ "@elliemae/ds-shared": "1.58.0-rc.2",
25
+ "@elliemae/ds-system": "1.58.0-rc.2",
26
+ "@elliemae/ds-utilities": "1.58.0-rc.2",
27
27
  "@popperjs/core": "2.9.2",
28
28
  "react-desc": "^4.1.2",
29
29
  "react-popper": "2.2.5"