@elliemae/ds-tooltip 3.39.2 → 3.39.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/cjs/v1/DSTooltip.js +1 -1
  2. package/dist/cjs/v1/DSTooltip.js.map +2 -2
  3. package/dist/cjs/v2/DSTooltip.js +1 -1
  4. package/dist/cjs/v2/DSTooltip.js.map +2 -2
  5. package/dist/cjs/v3/DSTooltipV3.js +11 -2
  6. package/dist/cjs/v3/DSTooltipV3.js.map +2 -2
  7. package/dist/cjs/v3/defaultProps.js +2 -1
  8. package/dist/cjs/v3/defaultProps.js.map +2 -2
  9. package/dist/cjs/v3/react-desc-prop-types.js +3 -0
  10. package/dist/cjs/v3/react-desc-prop-types.js.map +2 -2
  11. package/dist/cjs/v3/styles.js +15 -4
  12. package/dist/cjs/v3/styles.js.map +2 -2
  13. package/dist/cjs/v3/typescript-testing/typescript-tooltip-v3-valid.js +10 -11
  14. package/dist/cjs/v3/typescript-testing/typescript-tooltip-v3-valid.js.map +2 -2
  15. package/dist/esm/v1/DSTooltip.js +1 -1
  16. package/dist/esm/v1/DSTooltip.js.map +2 -2
  17. package/dist/esm/v2/DSTooltip.js +1 -1
  18. package/dist/esm/v2/DSTooltip.js.map +2 -2
  19. package/dist/esm/v3/DSTooltipV3.js +11 -2
  20. package/dist/esm/v3/DSTooltipV3.js.map +2 -2
  21. package/dist/esm/v3/defaultProps.js +2 -1
  22. package/dist/esm/v3/defaultProps.js.map +2 -2
  23. package/dist/esm/v3/react-desc-prop-types.js +3 -0
  24. package/dist/esm/v3/react-desc-prop-types.js.map +2 -2
  25. package/dist/esm/v3/styles.js +15 -4
  26. package/dist/esm/v3/styles.js.map +2 -2
  27. package/dist/esm/v3/typescript-testing/typescript-tooltip-v3-valid.js +10 -11
  28. package/dist/esm/v3/typescript-testing/typescript-tooltip-v3-valid.js.map +2 -2
  29. package/dist/types/v3/react-desc-prop-types.d.ts +1 -0
  30. package/dist/types/v3/styles.d.ts +3 -1
  31. package/package.json +12 -12
@@ -66,7 +66,7 @@ const TooltipText = (0, import_ds_classnames.aggregatedClasses)("span")(blockNam
66
66
  const useDeprecateComponent = ({ componentName, version }) => {
67
67
  (0, import_react.useEffect)(() => {
68
68
  if (true)
69
- console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
69
+ console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
70
70
  }, [componentName, version]);
71
71
  };
72
72
  const DSTooltip = ({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v1/DSTooltip.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useEffect } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { DSPopper, PopperPositions, PopperInteractions, interactions, positions } from '@elliemae/ds-popper';\nimport { TooltipType } from './TooltipType.js';\n\nconst getComponentFromProps = <T,>(\n Component: React.ReactElement<PropsWithChildren<unknown>> | React.ComponentType<unknown>,\n props: T,\n children: React.ReactNode[] = [],\n) => {\n if (!Component) return null;\n const componentChildren =\n typeof Component !== 'function' && Component.props\n ? Array.isArray(Component.props.children)\n ? Component.props.children\n : [Component.props.children]\n : null;\n return typeof Component === 'function' ? (\n <Component {...props}>{children}</Component>\n ) : (\n React.cloneElement(\n Component,\n {\n ...Component.props,\n ...props,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n componentChildren ? [...componentChildren, ...children] : [...children],\n )\n );\n};\n\nconst blockName = 'tooltip';\n\nconst TooltipContainer: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n }\n> = aggregatedClasses('div')(blockName, null, {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\nconst TooltipText: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n }\n> = aggregatedClasses('span')(blockName, 'text', {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\ntype DSTooltipProps = {\n containerProps: object;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n placement: string;\n title: string;\n delayClose: number;\n delayOpen: number;\n interactionType: string;\n triggerComponent: React.ReactElement;\n className: string;\n isOpen?: boolean;\n onOpen: () => null;\n tooltipType: string;\n showArrow: boolean;\n zIndex: number;\n};\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltip = ({\n containerProps = {},\n innerRef,\n placement = PopperPositions.TOP,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n interactionType = PopperInteractions.HOVER,\n triggerComponent,\n className = '',\n isOpen = undefined,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n zIndex,\n ...otherTooltipProps\n}: DSTooltipProps) => {\n useDeprecateComponent({ componentName: 'ds-tooltip', version: 'TBD Date: 2023 Q3' });\n\n const { cssClassName: tooltipBlockName } = convertPropToCssClassName(blockName);\n\n let Content: React.ReactNode = title;\n if (typeof title === 'string') {\n Content = <TooltipText>{title}</TooltipText>;\n }\n return (\n <DSPopper\n blockName={tooltipBlockName}\n contentComponent={\n <TooltipContainer\n {...containerProps}\n {...otherTooltipProps}\n className={`tooltip-container--${tooltipType} ${className}`}\n innerRef={innerRef}\n >\n {Content}\n </TooltipContainer>\n }\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={interactionType}\n isOpen={isOpen}\n onOpen={onOpen}\n placement={placement}\n showArrow={tooltipType === TooltipType.TOOLTIP ? showArrow : false}\n triggerComponent={getComponentFromProps(triggerComponent, {})}\n zIndex={zIndex}\n wrapExtraComponent={undefined}\n children={undefined}\n renderReference={undefined}\n referenceNode={undefined}\n />\n );\n};\n\nconst tooltipProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n placement: PropTypes.oneOf(positions).description('Tooltip position').defaultValue(PopperPositions.TOP),\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,\n delayClose: PropTypes.string.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),\n delayOpen: PropTypes.string.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),\n interactionType: PropTypes.oneOf(interactions)\n .description('A type indicating how to open/close the tooltip')\n .defaultValue(PopperInteractions.HOVER),\n triggerComponent: PropTypes.element.description(\n `The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`,\n ).isRequired,\n isOpen: PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),\n onOpen: PropTypes.func.description('Handler when the tooltip opens'),\n springAnimationComponent: PropTypes.element.description('Spring animation component'),\n showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),\n className: PropTypes.string.description('css class'),\n tooltipType: PropTypes.oneOf(['tooltip', 'toolbar']).description('Type of tooltip').defaultValue(TooltipType.TOOLTIP),\n zIndex: PropTypes.number.description('z-index value assigned to the tooltip').defaultValue(undefined),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the tooltip container element'),\n} as React.WeakValidationMap<unknown>;\n\nDSTooltip.displayName = 'DSTooltip';\nconst TooltipWithSchema = describe(DSTooltip);\nTooltipWithSchema.propTypes = tooltipProps;\n\nexport { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema };\nexport default DSTooltip;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AAtBJ,mBAAiC;AAGjC,2BAA6D;AAC7D,8BAAoC;AACpC,uBAAwD;AACxD,uBAAuF;AACvF,yBAA4B;AAE5B,MAAM,wBAAwB,CAC5B,WACA,OACA,WAA8B,CAAC,MAC5B;AACH,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,oBACJ,OAAO,cAAc,cAAc,UAAU,QACzC,MAAM,QAAQ,UAAU,MAAM,QAAQ,IACpC,UAAU,MAAM,WAChB,CAAC,UAAU,MAAM,QAAQ,IAC3B;AACN,SAAO,OAAO,cAAc,aAC1B,4CAAC,aAAW,GAAG,OAAQ,UAAS,IAEhC,aAAAA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,MACE,GAAG,UAAU;AAAA,MACb,GAAG;AAAA,IACL;AAAA;AAAA,IAEA,oBAAoB,CAAC,GAAG,mBAAmB,GAAG,QAAQ,IAAI,CAAC,GAAG,QAAQ;AAAA,EACxE;AAEJ;AAEA,MAAM,YAAY;AAElB,MAAM,uBAMF,wCAAkB,KAAK,EAAE,WAAW,MAAM;AAAA,EAC5C,+BAA+B,CAAC,aAAa,WAAW;AAC1D,CAAC;AAED,MAAM,kBAIF,wCAAkB,MAAM,EAAE,WAAW,QAAQ;AAAA,EAC/C,+BAA+B,CAAC,aAAa,WAAW;AAC1D,CAAC;AAwBD,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AACnE,8BAAU,MAAM;AACd,QAAI;AACF,cAAQ,MAAM,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACzG,GAAG,CAAC,eAAe,OAAO,CAAC;A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EAAE,YAAY,iBAAiB,EAAE;AAAA,EACjG,YAAY,kCAAU,OAAO,YAAY,4BAA4B,EAAE,aAAa,oCAAmB;AAAA,EACvG,WAAW,kCAAU,OAAO,YAAY,4BAA4B,EAAE,aAAa,mCAAkB;AAAA,EACrG,iBAAiB,kCAAU,MAAM,6BAAY,EAC1C,YAAY,iDAAiD,EAC7D,aAAa,oCAAmB,KAAK;AAAA,EACxC,kBAAkB,kCAAU,QAAQ;AAAA,IAClC;AAAA;AAAA;AAAA,EAGF,EAAE;AAAA,EACF,QAAQ,kCAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,MAAS;AAAA,EAClG,QAAQ,kCAAU,KAAK,YAAY,gCAAgC;AAAA,EACnE,0BAA0B,kCAAU,QAAQ,YAAY,4BAA4B;AAAA,EACpF,WAAW,kCAAU,KAAK,YAAY,iCAAiC,EAAE,aAAa,IAAI;AAAA,EAC1F,WAAW,kCAAU,OAAO,YAAY,WAAW;AAAA,EACnD,aAAa,kCAAU,MAAM,CAAC,WAAW,SAAS,CAAC,EAAE,YAAY,iBAAiB,EAAE,aAAa,+BAAY,OAAO;AAAA,EACpH,QAAQ,kCAAU,OAAO,YAAY,uCAAuC,EAAE,aAAa,MAAS;AAAA,EACpG,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,sCAAsC;AACtH;AAEA,UAAU,cAAc;AACxB,MAAM,wBAAoB,kCAAS,SAAS;AAC5C,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useEffect } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { DSPopper, PopperPositions, PopperInteractions, interactions, positions } from '@elliemae/ds-popper';\nimport { TooltipType } from './TooltipType.js';\n\nconst getComponentFromProps = <T,>(\n Component: React.ReactElement<PropsWithChildren<unknown>> | React.ComponentType<unknown>,\n props: T,\n children: React.ReactNode[] = [],\n) => {\n if (!Component) return null;\n const componentChildren =\n typeof Component !== 'function' && Component.props\n ? Array.isArray(Component.props.children)\n ? Component.props.children\n : [Component.props.children]\n : null;\n return typeof Component === 'function' ? (\n <Component {...props}>{children}</Component>\n ) : (\n React.cloneElement(\n Component,\n {\n ...Component.props,\n ...props,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n componentChildren ? [...componentChildren, ...children] : [...children],\n )\n );\n};\n\nconst blockName = 'tooltip';\n\nconst TooltipContainer: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n }\n> = aggregatedClasses('div')(blockName, null, {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\nconst TooltipText: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n }\n> = aggregatedClasses('span')(blockName, 'text', {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\ntype DSTooltipProps = {\n containerProps: object;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n placement: string;\n title: string;\n delayClose: number;\n delayOpen: number;\n interactionType: string;\n triggerComponent: React.ReactElement;\n className: string;\n isOpen?: boolean;\n onOpen: () => null;\n tooltipType: string;\n showArrow: boolean;\n zIndex: number;\n};\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltip = ({\n containerProps = {},\n innerRef,\n placement = PopperPositions.TOP,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n interactionType = PopperInteractions.HOVER,\n triggerComponent,\n className = '',\n isOpen = undefined,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n zIndex,\n ...otherTooltipProps\n}: DSTooltipProps) => {\n useDeprecateComponent({ componentName: 'ds-tooltip', version: 'TBD Date: 2023 Q3' });\n\n const { cssClassName: tooltipBlockName } = convertPropToCssClassName(blockName);\n\n let Content: React.ReactNode = title;\n if (typeof title === 'string') {\n Content = <TooltipText>{title}</TooltipText>;\n }\n return (\n <DSPopper\n blockName={tooltipBlockName}\n contentComponent={\n <TooltipContainer\n {...containerProps}\n {...otherTooltipProps}\n className={`tooltip-container--${tooltipType} ${className}`}\n innerRef={innerRef}\n >\n {Content}\n </TooltipContainer>\n }\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={interactionType}\n isOpen={isOpen}\n onOpen={onOpen}\n placement={placement}\n showArrow={tooltipType === TooltipType.TOOLTIP ? showArrow : false}\n triggerComponent={getComponentFromProps(triggerComponent, {})}\n zIndex={zIndex}\n wrapExtraComponent={undefined}\n children={undefined}\n renderReference={undefined}\n referenceNode={undefined}\n />\n );\n};\n\nconst tooltipProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n placement: PropTypes.oneOf(positions).description('Tooltip position').defaultValue(PopperPositions.TOP),\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,\n delayClose: PropTypes.string.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),\n delayOpen: PropTypes.string.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),\n interactionType: PropTypes.oneOf(interactions)\n .description('A type indicating how to open/close the tooltip')\n .defaultValue(PopperInteractions.HOVER),\n triggerComponent: PropTypes.element.description(\n `The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`,\n ).isRequired,\n isOpen: PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),\n onOpen: PropTypes.func.description('Handler when the tooltip opens'),\n springAnimationComponent: PropTypes.element.description('Spring animation component'),\n showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),\n className: PropTypes.string.description('css class'),\n tooltipType: PropTypes.oneOf(['tooltip', 'toolbar']).description('Type of tooltip').defaultValue(TooltipType.TOOLTIP),\n zIndex: PropTypes.number.description('z-index value assigned to the tooltip').defaultValue(undefined),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the tooltip container element'),\n} as React.WeakValidationMap<unknown>;\n\nDSTooltip.displayName = 'DSTooltip';\nconst TooltipWithSchema = describe(DSTooltip);\nTooltipWithSchema.propTypes = tooltipProps;\n\nexport { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema };\nexport default DSTooltip;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AAtBJ,mBAAiC;AAGjC,2BAA6D;AAC7D,8BAAoC;AACpC,uBAAwD;AACxD,uBAAuF;AACvF,yBAA4B;AAE5B,MAAM,wBAAwB,CAC5B,WACA,OACA,WAA8B,CAAC,MAC5B;AACH,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,oBACJ,OAAO,cAAc,cAAc,UAAU,QACzC,MAAM,QAAQ,UAAU,MAAM,QAAQ,IACpC,UAAU,MAAM,WAChB,CAAC,UAAU,MAAM,QAAQ,IAC3B;AACN,SAAO,OAAO,cAAc,aAC1B,4CAAC,aAAW,GAAG,OAAQ,UAAS,IAEhC,aAAAA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,MACE,GAAG,UAAU;AAAA,MACb,GAAG;AAA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CAAU,OAAO,YAAY,uCAAuC,EAAE,aAAa,MAAS;AAAA,EACpG,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE,YAAY,sCAAsC;AACtH;AAEA,UAAU,cAAc;AACxB,MAAM,wBAAoB,kCAAS,SAAS;AAC5C,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -49,7 +49,7 @@ var import_setMultipleRefs = require("./utils/setMultipleRefs.js");
49
49
  const useDeprecateComponent = ({ componentName, version }) => {
50
50
  (0, import_react.useEffect)(() => {
51
51
  if (true)
52
- console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
52
+ console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
53
53
  }, [componentName, version]);
54
54
  };
55
55
  const DSTooltipV2 = ({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v2/DSTooltip.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useState, useCallback, useEffect, useRef, useContext } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSPortal } from '@elliemae/ds-portal';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { usePopper } from 'react-popper';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { tooltipPositions } from './utils/tooltipPositions.js';\nimport { TooltipType } from './TooltipType.js';\nimport {\n StyledTooltipContainer,\n StyledTriggerComponentContainer,\n StyledTooltipText,\n StyledAnimatedTooltip,\n} from './styles.js';\nimport { DSTooltipArrow } from './DSTooltipArrow.js';\nimport type { DSTooltipT } from './index.js';\nimport { tooltipV2Props } from './propTypes.js';\nimport { setMultipleRefs } from './utils/setMultipleRefs.js';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltipV2 = ({\n containerProps = {},\n innerRef,\n placement = tooltipPositions.BOTTOM,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n triggerComponent = null,\n className = '',\n getIsOpen = () => null,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n offset = [0, 14],\n zIndex,\n extraModifiers = {},\n}: DSTooltipT): React.ReactElement => {\n useDeprecateComponent({ componentName: 'ds-tooltip-v2', version: 'TBD Date: 2023 Q3' });\n\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState(triggerComponent);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const timerOpen = useRef<NodeJS.Timeout>();\n const timerClosed = useRef<NodeJS.Timeout>();\n\n const { styles, attributes } = usePopper(referenceElement as HTMLElement | null, popperElement, {\n placement,\n modifiers: [\n { name: 'hide', enabled: true },\n {\n name: 'offset',\n enabled: true,\n options: {\n offset: tooltipType === TooltipType.TOOLBAR ? [0, 0] : offset,\n },\n },\n { name: 'arrow', options: { element: arrowElement } },\n { ...extraModifiers },\n ],\n });\n\n const handleShowTooltipOn = useCallback(() => {\n timerOpen.current = setTimeout(() => {\n setShowTooltip(true);\n setIsAnimating(true);\n getIsOpen(true);\n onOpen();\n }, delayOpen);\n }, [delayOpen, getIsOpen, onOpen]);\n\n const handleShowTooltipOff = useCallback(() => {\n timerClosed.current = setTimeout(() => {\n setShowTooltip(false);\n setIsAnimating(true);\n getIsOpen(false);\n }, delayClose);\n }, [delayClose, getIsOpen]);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n (e.target as HTMLElement).blur();\n }\n }, []);\n\n const checkAnimationStatus = useCallback(() => {\n if (!showTooltip) {\n setIsAnimating(false);\n }\n }, [showTooltip]);\n\n useEffect(\n () => () => {\n clearTimeout(timerClosed.current);\n clearTimeout(timerOpen.current);\n },\n [],\n );\n\n const theme = useContext(ThemeContext);\n\n return (\n <>\n <StyledTriggerComponentContainer\n innerRef={setReferenceElement as unknown as React.RefObject<HTMLDivElement>}\n onMouseEnter={handleShowTooltipOn}\n onMouseLeave={handleShowTooltipOff}\n onFocus={handleShowTooltipOn}\n onBlur={handleShowTooltipOff}\n onKeyDown={handleKeyDown}\n >\n {triggerComponent}\n </StyledTriggerComponentContainer>\n {isAnimating || showTooltip ? (\n <DSPortal>\n <StyledTooltipContainer\n className={className}\n showTooltip={showTooltip}\n tooltipType={tooltipType}\n data-testid=\"ds-tooltip-container\"\n innerRef={(ref) => setMultipleRefs(setPopperElement, innerRef)(ref)}\n style={{ ...styles.popper, zIndex: zIndex ?? theme.zIndex.tooltip }}\n {...containerProps}\n {...attributes.popper}\n >\n <StyledAnimatedTooltip\n showTooltip={showTooltip}\n data-testid=\"ds-tooltip\"\n onAnimationEnd={checkAnimationStatus}\n >\n <StyledTooltipText>{title}</StyledTooltipText>\n {tooltipType === TooltipType.TOOLTIP && showArrow ? (\n <DSTooltipArrow\n arrowElementRef={setArrowElement}\n style={styles.arrow}\n placement={attributes.popper ? attributes.popper['data-popper-placement'] : 'bottom'}\n />\n ) : null}\n </StyledAnimatedTooltip>\n </StyledTooltipContainer>\n </DSPortal>\n ) : null}\n </>\n );\n};\n\nDSTooltipV2.displayName = 'DSTooltipV2';\nconst TooltipV2WithSchema = describe(DSTooltipV2);\nTooltipV2WithSchema.propTypes = tooltipV2Props;\n\nexport { DSTooltipV2, TooltipV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": 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;AAAA,QACV,cAAc;AAAA,QACd,cAAc;AAAA,QACd,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,WAAW;AAAA,QAEV;AAAA;AAAA,IACH;AAAA,IACC,eAAe,cACd,4CAAC,6BACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAY;AAAA,QACZ,UAAU,CAAC,YAAQ,wCAAgB,kBAAkB,QAAQ,EAAE,GAAG;AAAA,QAClE,OAAO,EAAE,GAAG,OAAO,QAAQ,QAAQ,UAAU,MAAM,OAAO,QAAQ;AAAA,QACjE,GAAG;AAAA,QACH,GAAG,WAAW;AAAA,QAEf;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAY;AAAA,YACZ,gBAAgB;AAAA,YAEhB;AAAA,0DAAC,mCAAmB,iBAAM;AAAA,cACzB,gBAAgB,+BAAY,WAAW,YACtC;AAAA,gBAAC;AAAA;AAAA,kBACC,iBAAiB;AAAA,kBACjB,OAAO,OAAO;AAAA,kBACd,WAAW,WAAW,SAAS,WAAW,OAAO,uBAAuB,IAAI;AAAA;AAAA,cAC9E,IACE;AAAA;AAAA;AAAA,QACN;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,0BAAsB,kCAAS,WAAW;AAChD,oBAAoB,YAAY;",
4
+ "sourcesContent": ["/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useState, useCallback, useEffect, useRef, useContext } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSPortal } from '@elliemae/ds-portal';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { usePopper } from 'react-popper';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { tooltipPositions } from './utils/tooltipPositions.js';\nimport { TooltipType } from './TooltipType.js';\nimport {\n StyledTooltipContainer,\n StyledTriggerComponentContainer,\n StyledTooltipText,\n StyledAnimatedTooltip,\n} from './styles.js';\nimport { DSTooltipArrow } from './DSTooltipArrow.js';\nimport type { DSTooltipT } from './index.js';\nimport { tooltipV2Props } from './propTypes.js';\nimport { setMultipleRefs } from './utils/setMultipleRefs.js';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltipV2 = ({\n containerProps = {},\n innerRef,\n placement = tooltipPositions.BOTTOM,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n triggerComponent = null,\n className = '',\n getIsOpen = () => null,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n offset = [0, 14],\n zIndex,\n extraModifiers = {},\n}: DSTooltipT): React.ReactElement => {\n useDeprecateComponent({ componentName: 'ds-tooltip-v2', version: 'TBD Date: 2023 Q3' });\n\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState(triggerComponent);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const timerOpen = useRef<NodeJS.Timeout>();\n const timerClosed = useRef<NodeJS.Timeout>();\n\n const { styles, attributes } = usePopper(referenceElement as HTMLElement | null, popperElement, {\n placement,\n modifiers: [\n { name: 'hide', enabled: true },\n {\n name: 'offset',\n enabled: true,\n options: {\n offset: tooltipType === TooltipType.TOOLBAR ? [0, 0] : offset,\n },\n },\n { name: 'arrow', options: { element: arrowElement } },\n { ...extraModifiers },\n ],\n });\n\n const handleShowTooltipOn = useCallback(() => {\n timerOpen.current = setTimeout(() => {\n setShowTooltip(true);\n setIsAnimating(true);\n getIsOpen(true);\n onOpen();\n }, delayOpen);\n }, [delayOpen, getIsOpen, onOpen]);\n\n const handleShowTooltipOff = useCallback(() => {\n timerClosed.current = setTimeout(() => {\n setShowTooltip(false);\n setIsAnimating(true);\n getIsOpen(false);\n }, delayClose);\n }, [delayClose, getIsOpen]);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n (e.target as HTMLElement).blur();\n }\n }, []);\n\n const checkAnimationStatus = useCallback(() => {\n if (!showTooltip) {\n setIsAnimating(false);\n }\n }, [showTooltip]);\n\n useEffect(\n () => () => {\n clearTimeout(timerClosed.current);\n clearTimeout(timerOpen.current);\n },\n [],\n );\n\n const theme = useContext(ThemeContext);\n\n return (\n <>\n <StyledTriggerComponentContainer\n innerRef={setReferenceElement as unknown as React.RefObject<HTMLDivElement>}\n onMouseEnter={handleShowTooltipOn}\n onMouseLeave={handleShowTooltipOff}\n onFocus={handleShowTooltipOn}\n onBlur={handleShowTooltipOff}\n onKeyDown={handleKeyDown}\n >\n {triggerComponent}\n </StyledTriggerComponentContainer>\n {isAnimating || showTooltip ? (\n <DSPortal>\n <StyledTooltipContainer\n className={className}\n showTooltip={showTooltip}\n tooltipType={tooltipType}\n data-testid=\"ds-tooltip-container\"\n innerRef={(ref) => setMultipleRefs(setPopperElement, innerRef)(ref)}\n style={{ ...styles.popper, zIndex: zIndex ?? theme.zIndex.tooltip }}\n {...containerProps}\n {...attributes.popper}\n >\n <StyledAnimatedTooltip\n showTooltip={showTooltip}\n data-testid=\"ds-tooltip\"\n onAnimationEnd={checkAnimationStatus}\n >\n <StyledTooltipText>{title}</StyledTooltipText>\n {tooltipType === TooltipType.TOOLTIP && showArrow ? (\n <DSTooltipArrow\n arrowElementRef={setArrowElement}\n style={styles.arrow}\n placement={attributes.popper ? attributes.popper['data-popper-placement'] : 'bottom'}\n />\n ) : null}\n </StyledAnimatedTooltip>\n </StyledTooltipContainer>\n </DSPortal>\n ) : null}\n </>\n );\n};\n\nDSTooltipV2.displayName = 'DSTooltipV2';\nconst TooltipV2WithSchema = describe(DSTooltipV2);\nTooltipV2WithSchema.propTypes = tooltipV2Props;\n\nexport { DSTooltipV2, TooltipV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsHnB;AAlHJ,mBAA4E;AAC5E,8BAAyB;AACzB,uBAAyB;AACzB,uBAAwD;AACxD,0BAA0B;AAC1B,uBAA6B;AAC7B,8BAAiC;AACjC,yBAA4B;AAC5B,oBAKO;AACP,4BAA+B;AAE/B,uBAA+B;AAC/B,6BAAgC;AAOhC,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AACnE,8BAAU,MAAM;AACd,QAAI;AACF,cAAQ,KAAK,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACxG,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY,yCAAiB;AAAA,EAC7B,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,YAAY,MAAM;AAAA,EAClB,SAAS,MAAM;AAAA,EACf,cAAc,+BAAY;AAAA,EAC1B,YAAY;AAAA,EACZ,SAAS,CAAC,GAAG,EAAE;AAAA,EACf;AAAA,EACA,iBAAiB,CAAC;AACpB,MAAsC;AACpC,wBAAsB,EAAE,eAAe,iBAAiB,SAAS,oBAAoB,CAAC;AAEtF,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAkB,KAAK;AAC7D,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAkB,KAAK;AAC7D,QAAM,CAAC,kBAAkB,mBAAmB,QAAI,uBAAS,gBAAg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hB;AAAA,IACE,MAAM,MAAM;AACV,mBAAa,YAAY,OAAO;AAChC,mBAAa,UAAU,OAAO;AAAA,IAChC;AAAA,IACA,CAAC;AAAA,EACH;AAEA,QAAM,YAAQ,yBAAW,6BAAY;AAErC,SACE,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,cAAc;AAAA,QACd,cAAc;AAAA,QACd,SAAS;AAAA,QACT,QAAQ;AAAA,QACR,WAAW;AAAA,QAEV;AAAA;AAAA,IACH;AAAA,IACC,eAAe,cACd,4CAAC,6BACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAY;AAAA,QACZ,UAAU,CAAC,YAAQ,wCAAgB,kBAAkB,QAAQ,EAAE,GAAG;AAAA,QAClE,OAAO,EAAE,GAAG,OAAO,QAAQ,QAAQ,UAAU,MAAM,OAAO,QAAQ;AAAA,QACjE,GAAG;AAAA,QACH,GAAG,WAAW;AAAA,QAEf;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAY;AAAA,YACZ,gBAAgB;AAAA,YAEhB;AAAA,0DAAC,mCAAmB,iBAAM;AAAA,cACzB,gBAAgB,+BAAY,WAAW,YACtC;AAAA,gBAAC;AAAA;AAAA,kBACC,iBAAiB;AAAA,kBACjB,OAAO,OAAO;AAAA,kBACd,WAAW,WAAW,SAAS,WAAW,OAAO,uBAAuB,IAAI;AAAA;AAAA,cAC9E,IACE;AAAA;AAAA;AAAA,QACN;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,0BAAsB,kCAAS,WAAW;AAChD,oBAAoB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -45,7 +45,7 @@ var import_TooltipV3DatatestId = require("./TooltipV3DatatestId.js");
45
45
  var import_defaultProps = require("./defaultProps.js");
46
46
  var import_styles = require("./styles.js");
47
47
  const DSTooltipV3 = (props) => {
48
- const { text, children, onOpen, onClose, id, textAlign, wrapWords, ...extraPopperJsProps } = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_defaultProps.defaultProps);
48
+ const { text, children, onOpen, onClose, id, textAlign, wrapWords, applyTooltipOverflowWrap, ...extraPopperJsProps } = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_defaultProps.defaultProps);
49
49
  const theme = (0, import_react.useContext)(import_ds_system.ThemeContext);
50
50
  const config = import_react.default.useMemo(() => ({ onOpen, onClose }), [onOpen, onClose]);
51
51
  const tooltipHelpers = (0, import_ds_hooks_headless_tooltip.useHeadlessTooltip)(config);
@@ -74,7 +74,16 @@ const DSTooltipV3 = (props) => {
74
74
  zIndex: theme.zIndex.tooltip,
75
75
  ...extraPopperJsProps,
76
76
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-testid": `${import_TooltipV3DatatestId.TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== "" ? `_${id}` : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledTooltipContainer, { children: [
77
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledTooltipText, { "aria-label": text, textAlign, wrapWords, children: text }),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
+ import_styles.StyledTooltipText,
79
+ {
80
+ "aria-label": text,
81
+ textAlign,
82
+ wrapWords,
83
+ $applyTooltipOverflowWrap: applyTooltipOverflowWrap,
84
+ children: text
85
+ }
86
+ ),
78
87
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledMouseOverDetectionBox, {})
79
88
  ] }) })
80
89
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v3/DSTooltipV3.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport { useMemoMergePropsWithDefault, describe } from '@elliemae/ds-props-helpers';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport { defaultProps } from './defaultProps.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, wrapWords, ...extraPopperJsProps } =\n useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(props, defaultProps);\n\n const theme = useContext(ThemeContext);\n const config = React.useMemo(() => ({ onOpen, onClose }), [onOpen, onClose]);\n const tooltipHelpers = useHeadlessTooltip(config);\n\n React.useEffect(() => {\n if (extraPopperJsProps.showPopover === false) {\n tooltipHelpers.hideTooltip();\n }\n }, [extraPopperJsProps.showPopover, tooltipHelpers]);\n return (\n <StyledTriggerWrapper\n onMouseEnter={tooltipHelpers.onMouseEnter}\n onMouseLeave={tooltipHelpers.onMouseLeave}\n onPointerEnter={tooltipHelpers.onMouseEnter}\n onPointerLeave={tooltipHelpers.onMouseLeave}\n onFocus={tooltipHelpers.onFocus}\n onBlur={tooltipHelpers.onBlur}\n innerRef={tooltipHelpers.setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <DSPopperJS\n referenceElement={tooltipHelpers.referenceElement}\n showPopover={tooltipHelpers.shouldShowPopover}\n zIndex={theme.zIndex.tooltip}\n {...extraPopperJsProps}\n >\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText aria-label={text} textAlign={textAlign} wrapWords={wrapWords}>\n {text}\n </StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = 'DSTooltipV3';\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = propTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\n\nexport default DSTooltipV3;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgDb;AA/CV,mBAAkC;AAClC,yBAA2B;AAC3B,uCAAmC;AACnC,8BAAuD;AACvD,uBAA6B;AAC7B,mCAA0B;AAC1B,iCAAoC;AACpC,0BAA6B;AAC7B,oBAKO;AAGP,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,MAAM,UAAU,QAAQ,SAAS,IAAI,WAAW,WAAW,GAAG,mBAAmB,QACvF,sDAAyD,OAAO,gCAAY;AAE9E,QAAM,YAAQ,yBAAW,6BAAY;AACrC,QAAM,SAAS,aAAAA,QAAM,QAAQ,OAAO,EAAE,QAAQ,QAAQ,IAAI,CAAC,QAAQ,OAAO,CAAC;AAC3E,QAAM,qBAAiB,qDAAmB,MAAM;AAEhD,eAAAA,QAAM,UAAU,MAAM;AACpB,QAAI,mBAAmB,gBAAgB,OAAO;AAC5C,qBAAe,YAAY;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,mBAAmB,aAAa,cAAc,CAAC;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,eAAe;AAAA,MAC7B,cAAc,eAAe;AAAA,MAC7B,gBAAgB,eAAe;AAAA,MAC/B,gBAAgB,eAAe;AAAA,MAC/B,SAAS,eAAe;AAAA,MACxB,QAAQ,eAAe;AAAA,MACvB,UAAU,eAAe;AAAA,MACzB,eAAa,GAAG,+CAAoB,eAAe,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE;AAAA,MAE/E;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,kBAAkB,eAAe;AAAA,YACjC,aAAa,eAAe;AAAA,YAC5B,QAAQ,MAAM,OAAO;AAAA,YACpB,GAAG;AAAA,YAEJ,sDAAC,SAAI,eAAa,GAAG,+CAAoB,oBAAoB,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE,IACvF,uDAAC,wCACC;AAAA,0DAAC,mCAAkB,cAAY,MAAM,WAAsB,WACxD,gBACH;AAAA,cACA,4CAAC,6CAA4B;AAAA,eAC/B,GACF;AAAA;AAAA,QACF;AAAA,QAEC;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport { useMemoMergePropsWithDefault, describe } from '@elliemae/ds-props-helpers';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport { defaultProps } from './defaultProps.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, wrapWords, applyTooltipOverflowWrap, ...extraPopperJsProps } =\n useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(props, defaultProps);\n\n const theme = useContext(ThemeContext);\n const config = React.useMemo(() => ({ onOpen, onClose }), [onOpen, onClose]);\n const tooltipHelpers = useHeadlessTooltip(config);\n\n React.useEffect(() => {\n if (extraPopperJsProps.showPopover === false) {\n tooltipHelpers.hideTooltip();\n }\n }, [extraPopperJsProps.showPopover, tooltipHelpers]);\n return (\n <StyledTriggerWrapper\n onMouseEnter={tooltipHelpers.onMouseEnter}\n onMouseLeave={tooltipHelpers.onMouseLeave}\n onPointerEnter={tooltipHelpers.onMouseEnter}\n onPointerLeave={tooltipHelpers.onMouseLeave}\n onFocus={tooltipHelpers.onFocus}\n onBlur={tooltipHelpers.onBlur}\n innerRef={tooltipHelpers.setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <DSPopperJS\n referenceElement={tooltipHelpers.referenceElement}\n showPopover={tooltipHelpers.shouldShowPopover}\n zIndex={theme.zIndex.tooltip}\n {...extraPopperJsProps}\n >\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText\n aria-label={text}\n textAlign={textAlign}\n wrapWords={wrapWords}\n $applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n {text}\n </StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = 'DSTooltipV3';\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = propTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\n\nexport default DSTooltipV3;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgDb;AA/CV,mBAAkC;AAClC,yBAA2B;AAC3B,uCAAmC;AACnC,8BAAuD;AACvD,uBAA6B;AAC7B,mC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F;AAAA,QAEC;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -39,6 +39,7 @@ const defaultProps = {
39
39
  onClose: noop,
40
40
  id: "",
41
41
  textAlign: "left",
42
- wrapWords: false
42
+ wrapWords: false,
43
+ applyTooltipOverflowWrap: false
43
44
  };
44
45
  //# sourceMappingURL=defaultProps.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v3/defaultProps.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nexport const defaultProps: DSTooltipV3T.DefaultProps = {\n onOpen: noop,\n onClose: noop,\n id: '',\n textAlign: 'left',\n wrapWords: false,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,eAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AACb;",
4
+ "sourcesContent": ["import type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nexport const defaultProps: DSTooltipV3T.DefaultProps = {\n onOpen: noop,\n onClose: noop,\n id: '',\n textAlign: 'left',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,eAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,0BAA0B;AAC5B;",
6
6
  "names": []
7
7
  }
@@ -37,6 +37,9 @@ var import_constants = require("./constants.js");
37
37
  const propTypes = {
38
38
  text: import_ds_props_helpers.PropTypes.string.description("Tooltip text to be displayed on hover/focus").isRequired,
39
39
  textAlign: import_ds_props_helpers.PropTypes.oneOf(import_constants.TEXT_ALIGNMENT).description("Tooltip text alignment").defaultValue("left"),
40
+ applyTooltipOverflowWrap: import_ds_props_helpers.PropTypes.bool.description(
41
+ "when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap"
42
+ ).defaultValue(false),
40
43
  wrapWords: import_ds_props_helpers.PropTypes.bool.description("Break words into a new line. Useful when words exceed tooltip max-lenght.").defaultValue(false),
41
44
  children: import_ds_props_helpers.PropTypes.node.description("Element to tie the tooltip to, must be a single node").isRequired,
42
45
  withoutPortal: import_ds_props_helpers.PropTypes.bool.description("Whether or not the tooltip content should appear in a DOM portal or not").defaultValue(true),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v3/react-desc-prop-types.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\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 export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n ariaLabel?: string;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuration?: number;\n portalDOMContainer?: HTMLElement;\n startPlacementPreference?: Placement;\n placementOrderPreference?: Placement[];\n customOffset?: [number, number];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n text: string;\n }\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n textAlign: PropTypes.oneOf(TEXT_ALIGNMENT as unknown as unknown[])\n .description('Tooltip text alignment')\n .defaultValue('left'),\n wrapWords: PropTypes.bool\n .description('Break words into a new line. Useful when words exceed tooltip max-lenght.')\n .defaultValue(false),\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\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 withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])])\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n startPlacementPreference: PropTypes.oneOf(PLACEMENT)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(PLACEMENT))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AAC1B,uBAA0C;AA6DnC,MAAM,YAAY;AAAA,EACvB,MAAM,kCAAU,OAAO,YAAY,6CAA6C,EAAE;AAAA,EAClF,WAAW,kCAAU,MAAM,+BAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,WAAW,kCAAU,KAClB,YAAY,2EAA2E,EACvF,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KAAK,YAAY,sDAAsD,EAAE;AAAA,EAC7F,eAAe,kCAAU,KACtB,YAAY,yEAAyE,EACrF,aAAa,IAAI;AAAA,EACpB,cAAc,kCAAU,KAAK,YAAY,iDAAiD,EAAE,aAAa,KAAK;AAAA,EAC9G,iBAAiB,kCAAU,QACxB;AAAA,IACC;AAAA,EAEF,EACC,aAAa,MAAS;AAAA,EACzB,kBAAkB,kCAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EACrB,mBAAmB,kCAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EACjH,oBAAoB,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAC9E,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EACzB,0BAA0B,kCAAU,MAAM,0BAAS,EAChD,YAAY,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EACvB,0BAA0B,kCAAU,QAAQ,kCAAU,MAAM,0BAAS,CAAC,EACnE,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EACpD,QAAQ,kCAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAC/E,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;AAAA,EAC5G,WAAW,kCAAU,MAClB,YAAY,+FAA+F,EAC3G,aAAa,CAAC;AAAA,EACjB,IAAI,kCAAU,OAAO,YAAY,qCAAqC,EAAE,aAAa,EAAE;AAAA,EACvF,QAAQ,kCAAU,KAAK,YAAY,wDAAwD,EAAE,aAAa,UAAU;AAAA,EACpH,SAAS,kCAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,UAAU;AAC5B;",
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\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 export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n applyTooltipOverflowWrap: boolean;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n ariaLabel?: string;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuration?: number;\n portalDOMContainer?: HTMLElement;\n startPlacementPreference?: Placement;\n placementOrderPreference?: Placement[];\n customOffset?: [number, number];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n text: string;\n }\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n textAlign: PropTypes.oneOf(TEXT_ALIGNMENT as unknown as unknown[])\n .description('Tooltip text alignment')\n .defaultValue('left'),\n applyTooltipOverflowWrap: PropTypes.bool\n .description(\n 'when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap',\n )\n .defaultValue(false),\n wrapWords: PropTypes.bool\n .description('Break words into a new line. Useful when words exceed tooltip max-lenght.')\n .defaultValue(false),\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\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 withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])])\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n startPlacementPreference: PropTypes.oneOf(PLACEMENT)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(PLACEMENT))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AAC1B,uBAA0C;AA8DnC,MAAM,YAAY;AAAA,EACvB,MAAM,kCAAU,OAAO,YAAY,6CAA6C,EAAE;AAAA,EAClF,WAAW,kCAAU,MAAM,+BAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,0BAA0B,kCAAU,KACjC;AAAA,IACC;AAAA,EACF,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names": []
7
7
  }
@@ -53,10 +53,21 @@ const StyledTooltipContainer = import_ds_system.styled.div`
53
53
  const StyledTooltipText = import_ds_system.styled.div`
54
54
  display: inline-block;
55
55
  text-align: ${({ textAlign }) => textAlign};
56
- white-space: ${({ wrapWords }) => wrapWords ? "pre-wrap" : "normal"};
57
- word-break: ${({ wrapWords }) => wrapWords ? "break-all" : "normal"};
58
- word-wrap: break-word;
59
- overflow-wrap: break-word;
56
+
57
+ ${({ wrapWords, $applyTooltipOverflowWrap }) => {
58
+ if ($applyTooltipOverflowWrap) {
59
+ return `overflow-wrap: break-word;
60
+ white-space: pre-wrap;
61
+ min-width: 0px;`;
62
+ }
63
+ if (wrapWords) {
64
+ return `white-space: pre-wrap;
65
+ word-break: break-all;
66
+ overflow-wrap: break-word;`;
67
+ }
68
+ return `white-space: normal;
69
+ overflow-wrap: break-word;`;
70
+ }};
60
71
  `;
61
72
  const StyledMouseOverDetectionBox = import_ds_system.styled.div`
62
73
  position: absolute;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/v3/styles.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\ninterface StyledTooltipTextT {\n wrapWords: boolean;\n textAlign: DSTooltipV3T.TextAlignment;\n}\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<StyledTooltipTextT>`\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n white-space: ${({ wrapWords }) => (wrapWords ? 'pre-wrap' : 'normal')};\n word-break: ${({ wrapWords }) => (wrapWords ? 'break-all' : 'normal')};\n word-wrap: break-word;\n overflow-wrap: break-word;\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-flex;\n width: 100%;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAQhB,MAAM,yBAAyB,wBAAO;AAAA;AAAA,eAE9B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAK9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAG5C,MAAM,oBAAoB,wBAAO;AAAA;AAAA,gBAExB,CAAC,EAAE,UAAU,MAAM,SAAS;AAAA,iBAC3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,QAAS;AAAA,gBACvD,CAAC,EAAE,UAAU,MAAO,YAAY,cAAc,QAAS;AAAA;AAAA;AAAA;AAKhE,MAAM,8BAA8B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS3C,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\ninterface StyledTooltipTextT {\n wrapWords: boolean;\n textAlign: DSTooltipV3T.TextAlignment;\n}\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<StyledTooltipTextT & { $applyTooltipOverflowWrap: boolean }>`\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n\n ${({ wrapWords, $applyTooltipOverflowWrap }) => {\n if ($applyTooltipOverflowWrap) {\n // word-wrap: break-word; // <- this is the legacy \"overflow-wrap\" property, we should not need the legacy declaration\n // min-width: 0px; // <-- min-width:0px is needed because css grid auto-sizing are broken in css and impossible to understand\n return `overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;`;\n }\n if (wrapWords) {\n return `white-space: pre-wrap;\n word-break: break-all;\n overflow-wrap: break-word;`;\n }\n return `white-space: normal;\n overflow-wrap: break-word;`;\n }};\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-flex;\n width: 100%;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAQhB,MAAM,yBAAyB,wBAAO;AAAA;AAAA,eAE9B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAK9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAG5C,MAAM,oBAAoB,wBAAO;AAAA;AAAA,gBAExB,CAAC,EAAE,UAAU,MAAM,SAAS;AAAA;AAAA,IAExC,CAAC,EAAE,WAAW,0BAA0B,MAAM;AAC9C,MAAI,2BAA2B;AAG7B,WAAO;AAAA;AAAA;AAAA,EAGT;AACA,MAAI,WAAW;AACb,WAAO;AAAA;AAAA;AAAA,EAGT;AACA,SAAO;AAAA;AAET,CAAC;AAAA;AAGI,MAAM,8BAA8B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS3C,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -24,12 +24,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  var React = __toESM(require("react"));
25
25
  var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import__ = require("../index.js");
27
- const mockChildren = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {});
28
27
  const mockPlacementOrderPreference = ["bottom-start", "bottom", "bottom-end"];
29
28
  const mockCustomOffset = [0, 0];
30
29
  const mockModifiers = [{}];
31
30
  const testRequiredProps = {
32
- children: mockChildren(),
33
31
  text: ""
34
32
  };
35
33
  const testOptionalProps = {
@@ -71,7 +69,8 @@ const testCompleteDefaults = {
71
69
  onClose: () => {
72
70
  },
73
71
  textAlign: "center",
74
- wrapWords: false
72
+ wrapWords: false,
73
+ applyTooltipOverflowWrap: false
75
74
  };
76
75
  const testInternalProps = {
77
76
  ...testRequiredProps,
@@ -91,7 +90,7 @@ const testExplicitDefinition = {
91
90
  },
92
91
  textAlign: "center",
93
92
  wrapWords: false,
94
- children: mockChildren(),
93
+ applyTooltipOverflowWrap: false,
95
94
  text: "",
96
95
  zIndex: 1,
97
96
  ariaLabel: "",
@@ -115,7 +114,7 @@ const testInferedTypeCompatibility = {
115
114
  },
116
115
  textAlign: "center",
117
116
  wrapWords: false,
118
- children: mockChildren(),
117
+ applyTooltipOverflowWrap: false,
119
118
  text: "",
120
119
  zIndex: 1,
121
120
  ariaLabel: "",
@@ -139,7 +138,6 @@ const testDefinitionAsConst = {
139
138
  },
140
139
  textAlign: "center",
141
140
  wrapWords: false,
142
- children: mockChildren(),
143
141
  text: "",
144
142
  zIndex: 1,
145
143
  ariaLabel: "",
@@ -156,9 +154,9 @@ const testDefinitionAsConst = {
156
154
  showPopover: true
157
155
  };
158
156
  const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSTooltipV3, { ...testExplicitDefinition }),
160
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSTooltipV3, { ...testInferedTypeCompatibility }),
161
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSTooltipV3, { ...testDefinitionAsConst }),
157
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSTooltipV3, { ...testExplicitDefinition, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) }),
158
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSTooltipV3, { ...testInferedTypeCompatibility, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) }),
159
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSTooltipV3, { ...testDefinitionAsConst, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}) }),
162
160
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
163
161
  import__.DSTooltipV3,
164
162
  {
@@ -169,7 +167,6 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
169
167
  },
170
168
  textAlign: "center",
171
169
  wrapWords: false,
172
- children: mockChildren(),
173
170
  text: "",
174
171
  zIndex: 1,
175
172
  ariaLabel: "",
@@ -183,7 +180,9 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
183
180
  placementOrderPreference: ["bottom-start", "bottom", "bottom-end"],
184
181
  customOffset: [0, 0],
185
182
  modifiers: [],
186
- showPopover: true
183
+ showPopover: true,
184
+ applyTooltipOverflowWrap: false,
185
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {})
187
186
  }
188
187
  )
189
188
  ] });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v3/typescript-testing/typescript-tooltip-v3-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSTooltipV3 } from '../index.js';\nimport type { DSTooltipV3T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSTooltipV3T.Props;\ntype ComponentPropsInternals = DSTooltipV3T.InternalProps;\ntype ComponentPropsDefaultProps = DSTooltipV3T.DefaultProps;\ntype ComponentPropsOptionalProps = DSTooltipV3T.OptionalProps;\ntype ComponentPropsRequiredProps = DSTooltipV3T.RequiredProps;\n\nconst mockChildren = () => <div></div>;\n\nconst mockPlacementOrderPreference: DSTooltipV3T.Placement[] = ['bottom-start', 'bottom', 'bottom-end'];\nconst mockCustomOffset: DSTooltipV3T.OptionalProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: mockChildren(),\n text: '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n id: '',\n onOpen: () => {},\n onClose: () => {},\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n children: mockChildren(),\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n children: mockChildren(),\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n children: mockChildren(),\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSTooltipV3 {...testExplicitDefinition} />\n <DSTooltipV3 {...testInferedTypeCompatibility} />\n <DSTooltipV3 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSTooltipV3\n id=\"id\"\n onOpen={() => {}}\n onClose={() => {}}\n textAlign=\"center\"\n wrapWords={false}\n children={mockChildren()}\n text=\"\"\n zIndex={1}\n ariaLabel=\"\"\n withoutPortal={false}\n withoutArrow={false}\n withoutAnimation={false}\n boundaryElement={undefined}\n animationDuration={1000}\n portalDOMContainer={undefined}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={['bottom-start', 'bottom', 'bottom-end']}\n customOffset={[0, 0]}\n modifiers={[]}\n showPopover={true}\n />\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACWI;AAV3B,eAA4B;AAU5B,MAAM,eAAe,MAAM,4CAAC,SAAI;AAEhC,MAAM,+BAAyD,CAAC,gBAAgB,UAAU,YAAY;AACtG,MAAM,mBAA+D,CAAC,GAAG,CAAC;AAC1E,MAAM,gBAAyD,CAAC,CAAC,CAAC;AAElE,MAAM,oBAAiD;AAAA,EACrD,UAAU,aAAa;AAAA,EACvB,MAAM;AACR;AAEA,MAAM,oBAAiD;AAAA,EACrD,QAAQ;AAAA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L,QAAQ;AAAA,MACR,WAAU;AAAA,MACV,eAAe;AAAA,MACf,cAAc;AAAA,MACd,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,0BAAyB;AAAA,MACzB,0BAA0B,CAAC,gBAAgB,UAAU,YAAY;AAAA,MACjE,cAAc,CAAC,GAAG,CAAC;AAAA,MACnB,WAAW,CAAC;AAAA,MACZ,aAAa;AAAA;AAAA,EACf;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSTooltipV3 } from '../index.js';\nimport type { DSTooltipV3T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSTooltipV3T.Props;\ntype ComponentPropsInternals = DSTooltipV3T.InternalProps;\ntype ComponentPropsDefaultProps = DSTooltipV3T.DefaultProps;\ntype ComponentPropsOptionalProps = DSTooltipV3T.OptionalProps;\ntype ComponentPropsRequiredProps = DSTooltipV3T.RequiredProps;\n\nconst mockPlacementOrderPreference: DSTooltipV3T.Placement[] = ['bottom-start', 'bottom', 'bottom-end'];\nconst mockCustomOffset: DSTooltipV3T.OptionalProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testRequiredProps: Omit<ComponentPropsRequiredProps, 'children'> = {\n text: '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n id: '',\n onOpen: () => {},\n onClose: () => {},\n};\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testProps: Omit<ComponentPropsForApp, 'children'> = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n};\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testInternalProps: Omit<ComponentPropsInternals, 'children'> = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testExplicitDefinition: Omit<ComponentPropsForApp, 'children'> = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSTooltipV3 {...testExplicitDefinition}>\n <div></div>\n </DSTooltipV3>\n <DSTooltipV3 {...testInferedTypeCompatibility}>\n <div></div>\n </DSTooltipV3>\n <DSTooltipV3 {...testDefinitionAsConst}>\n <div></div>\n </DSTooltipV3>\n {/* works with inline values */}\n <DSTooltipV3\n id=\"id\"\n onOpen={() => {}}\n onClose={() => {}}\n textAlign=\"center\"\n wrapWords={false}\n text=\"\"\n zIndex={1}\n ariaLabel=\"\"\n withoutPortal={false}\n withoutArrow={false}\n withoutAnimation={false}\n boundaryElement={undefined}\n animationDuration={1000}\n portalDOMContainer={undefined}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={['bottom-start', 'bottom', 'bottom-end']}\n customOffset={[0, 0]}\n modifiers={[]}\n showPopover\n applyTooltipOverflowWrap={false}\n >\n <div></div>\n </DSTooltipV3>\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACuJrB;AAtJF,eAA4B;AAU5B,MAAM,+BAAyD,CAAC,gBAAg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AAC,SAAI,GACP;AAAA,EAEA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,QAAQ,MAAM;AAAA,MAAC;AAAA,MACf,SAAS,MAAM;AAAA,MAAC;AAAA,MAChB,WAAU;AAAA,MACV,WAAW;AAAA,MACX,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,WAAU;AAAA,MACV,eAAe;AAAA,MACf,cAAc;AAAA,MACd,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,0BAAyB;AAAA,MACzB,0BAA0B,CAAC,gBAAgB,UAAU,YAAY;AAAA,MACjE,cAAc,CAAC,GAAG,CAAC;AAAA,MACnB,WAAW,CAAC;AAAA,MACZ,aAAW;AAAA,MACX,0BAA0B;AAAA,MAE1B,sDAAC,SAAI;AAAA;AAAA,EACP;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -29,7 +29,7 @@ const TooltipText = aggregatedClasses("span")(blockName, "text", {
29
29
  const useDeprecateComponent = ({ componentName, version }) => {
30
30
  useEffect(() => {
31
31
  if (true)
32
- console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
32
+ console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
33
33
  }, [componentName, version]);
34
34
  };
35
35
  const DSTooltip = ({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v1/DSTooltip.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useEffect } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { DSPopper, PopperPositions, PopperInteractions, interactions, positions } from '@elliemae/ds-popper';\nimport { TooltipType } from './TooltipType.js';\n\nconst getComponentFromProps = <T,>(\n Component: React.ReactElement<PropsWithChildren<unknown>> | React.ComponentType<unknown>,\n props: T,\n children: React.ReactNode[] = [],\n) => {\n if (!Component) return null;\n const componentChildren =\n typeof Component !== 'function' && Component.props\n ? Array.isArray(Component.props.children)\n ? Component.props.children\n : [Component.props.children]\n : null;\n return typeof Component === 'function' ? (\n <Component {...props}>{children}</Component>\n ) : (\n React.cloneElement(\n Component,\n {\n ...Component.props,\n ...props,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n componentChildren ? [...componentChildren, ...children] : [...children],\n )\n );\n};\n\nconst blockName = 'tooltip';\n\nconst TooltipContainer: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n }\n> = aggregatedClasses('div')(blockName, null, {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\nconst TooltipText: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n }\n> = aggregatedClasses('span')(blockName, 'text', {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\ntype DSTooltipProps = {\n containerProps: object;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n placement: string;\n title: string;\n delayClose: number;\n delayOpen: number;\n interactionType: string;\n triggerComponent: React.ReactElement;\n className: string;\n isOpen?: boolean;\n onOpen: () => null;\n tooltipType: string;\n showArrow: boolean;\n zIndex: number;\n};\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltip = ({\n containerProps = {},\n innerRef,\n placement = PopperPositions.TOP,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n interactionType = PopperInteractions.HOVER,\n triggerComponent,\n className = '',\n isOpen = undefined,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n zIndex,\n ...otherTooltipProps\n}: DSTooltipProps) => {\n useDeprecateComponent({ componentName: 'ds-tooltip', version: 'TBD Date: 2023 Q3' });\n\n const { cssClassName: tooltipBlockName } = convertPropToCssClassName(blockName);\n\n let Content: React.ReactNode = title;\n if (typeof title === 'string') {\n Content = <TooltipText>{title}</TooltipText>;\n }\n return (\n <DSPopper\n blockName={tooltipBlockName}\n contentComponent={\n <TooltipContainer\n {...containerProps}\n {...otherTooltipProps}\n className={`tooltip-container--${tooltipType} ${className}`}\n innerRef={innerRef}\n >\n {Content}\n </TooltipContainer>\n }\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={interactionType}\n isOpen={isOpen}\n onOpen={onOpen}\n placement={placement}\n showArrow={tooltipType === TooltipType.TOOLTIP ? showArrow : false}\n triggerComponent={getComponentFromProps(triggerComponent, {})}\n zIndex={zIndex}\n wrapExtraComponent={undefined}\n children={undefined}\n renderReference={undefined}\n referenceNode={undefined}\n />\n );\n};\n\nconst tooltipProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n placement: PropTypes.oneOf(positions).description('Tooltip position').defaultValue(PopperPositions.TOP),\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,\n delayClose: PropTypes.string.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),\n delayOpen: PropTypes.string.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),\n interactionType: PropTypes.oneOf(interactions)\n .description('A type indicating how to open/close the tooltip')\n .defaultValue(PopperInteractions.HOVER),\n triggerComponent: PropTypes.element.description(\n `The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`,\n ).isRequired,\n isOpen: PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),\n onOpen: PropTypes.func.description('Handler when the tooltip opens'),\n springAnimationComponent: PropTypes.element.description('Spring animation component'),\n showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),\n className: PropTypes.string.description('css class'),\n tooltipType: PropTypes.oneOf(['tooltip', 'toolbar']).description('Type of tooltip').defaultValue(TooltipType.TOOLTIP),\n zIndex: PropTypes.number.description('z-index value assigned to the tooltip').defaultValue(undefined),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the tooltip container element'),\n} as React.WeakValidationMap<unknown>;\n\nDSTooltip.displayName = 'DSTooltip';\nconst TooltipWithSchema = describe(DSTooltip);\nTooltipWithSchema.propTypes = tooltipProps;\n\nexport { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema };\nexport default DSTooltip;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC0BnB;AAtBJ,OAAOA,UAAS,iBAAiB;AAGjC,SAAS,mBAAmB,iCAAiC;AAC7D,SAAS,UAAU,iBAAiB;AACpC,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,UAAU,iBAAiB,oBAAoB,cAAc,iBAAiB;AACvF,SAAS,mBAAmB;AAE5B,MAAM,wBAAwB,CAC5B,WACA,OACA,WAA8B,CAAC,MAC5B;AACH,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,oBACJ,OAAO,cAAc,cAAc,UAAU,QACzC,MAAM,QAAQ,UAAU,MAAM,QAAQ,IACpC,UAAU,MAAM,WAChB,CAAC,UAAU,MAAM,QAAQ,IAC3B;AACN,SAAO,OAAO,cAAc,aAC1B,oBAAC,aAAW,GAAG,OAAQ,UAAS,IAEhCA,OAAM;AAAA,IACJ;AAAA,IACA;AAAA,MACE,GAAG,UAAU;AAAA,MACb,GAAG;AAAA,IACL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AAa,MAAS;AAAA,EACpG,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE,YAAY,sCAAsC;AACtH;AAEA,UAAU,cAAc;AACxB,MAAM,oBAAoB,SAAS,SAAS;AAC5C,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useEffect } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { DSPopper, PopperPositions, PopperInteractions, interactions, positions } from '@elliemae/ds-popper';\nimport { TooltipType } from './TooltipType.js';\n\nconst getComponentFromProps = <T,>(\n Component: React.ReactElement<PropsWithChildren<unknown>> | React.ComponentType<unknown>,\n props: T,\n children: React.ReactNode[] = [],\n) => {\n if (!Component) return null;\n const componentChildren =\n typeof Component !== 'function' && Component.props\n ? Array.isArray(Component.props.children)\n ? Component.props.children\n : [Component.props.children]\n : null;\n return typeof Component === 'function' ? (\n <Component {...props}>{children}</Component>\n ) : (\n React.cloneElement(\n Component,\n {\n ...Component.props,\n ...props,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n componentChildren ? [...componentChildren, ...children] : [...children],\n )\n );\n};\n\nconst blockName = 'tooltip';\n\nconst TooltipContainer: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n className?: string;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n }\n> = aggregatedClasses('div')(blockName, null, {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\nconst TooltipText: React.ForwardRefExoticComponent<\n React.RefAttributes<unknown> & {\n children: React.ReactNode;\n }\n> = aggregatedClasses('span')(blockName, 'text', {\n propsToRemoveFromFinalElement: ['isHovered', 'isDragged'],\n});\n\ntype DSTooltipProps = {\n containerProps: object;\n innerRef: React.MutableRefObject<HTMLDivElement>;\n placement: string;\n title: string;\n delayClose: number;\n delayOpen: number;\n interactionType: string;\n triggerComponent: React.ReactElement;\n className: string;\n isOpen?: boolean;\n onOpen: () => null;\n tooltipType: string;\n showArrow: boolean;\n zIndex: number;\n};\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltip = ({\n containerProps = {},\n innerRef,\n placement = PopperPositions.TOP,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n interactionType = PopperInteractions.HOVER,\n triggerComponent,\n className = '',\n isOpen = undefined,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n zIndex,\n ...otherTooltipProps\n}: DSTooltipProps) => {\n useDeprecateComponent({ componentName: 'ds-tooltip', version: 'TBD Date: 2023 Q3' });\n\n const { cssClassName: tooltipBlockName } = convertPropToCssClassName(blockName);\n\n let Content: React.ReactNode = title;\n if (typeof title === 'string') {\n Content = <TooltipText>{title}</TooltipText>;\n }\n return (\n <DSPopper\n blockName={tooltipBlockName}\n contentComponent={\n <TooltipContainer\n {...containerProps}\n {...otherTooltipProps}\n className={`tooltip-container--${tooltipType} ${className}`}\n innerRef={innerRef}\n >\n {Content}\n </TooltipContainer>\n }\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={interactionType}\n isOpen={isOpen}\n onOpen={onOpen}\n placement={placement}\n showArrow={tooltipType === TooltipType.TOOLTIP ? showArrow : false}\n triggerComponent={getComponentFromProps(triggerComponent, {})}\n zIndex={zIndex}\n wrapExtraComponent={undefined}\n children={undefined}\n renderReference={undefined}\n referenceNode={undefined}\n />\n );\n};\n\nconst tooltipProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n placement: PropTypes.oneOf(positions).description('Tooltip position').defaultValue(PopperPositions.TOP),\n title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('Tooltip content').isRequired,\n delayClose: PropTypes.string.description('Delay to close the tooltip').defaultValue(DEFAULT_DELAY_CLOSE),\n delayOpen: PropTypes.string.description('Delay to open the tooltip ').defaultValue(DEFAULT_DELAY_OPEN),\n interactionType: PropTypes.oneOf(interactions)\n .description('A type indicating how to open/close the tooltip')\n .defaultValue(PopperInteractions.HOVER),\n triggerComponent: PropTypes.element.description(\n `The component that will open/close the tooltip. \n Cannot be used with disabled elements. \n https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled`,\n ).isRequired,\n isOpen: PropTypes.bool.description('Whether the tooltip is visible or not').defaultValue(undefined),\n onOpen: PropTypes.func.description('Handler when the tooltip opens'),\n springAnimationComponent: PropTypes.element.description('Spring animation component'),\n showArrow: PropTypes.bool.description('Whether to show an arrow or not').defaultValue(true),\n className: PropTypes.string.description('css class'),\n tooltipType: PropTypes.oneOf(['tooltip', 'toolbar']).description('Type of tooltip').defaultValue(TooltipType.TOOLTIP),\n zIndex: PropTypes.number.description('z-index value assigned to the tooltip').defaultValue(undefined),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description('Ref to the tooltip container element'),\n} as React.WeakValidationMap<unknown>;\n\nDSTooltip.displayName = 'DSTooltip';\nconst TooltipWithSchema = describe(DSTooltip);\nTooltipWithSchema.propTypes = tooltipProps;\n\nexport { DSTooltip, TooltipContainer, TooltipText, TooltipWithSchema };\nexport default DSTooltip;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC0BnB;AAtBJ,OAAOA,UAAS,iBAAiB;AAGjC,SAAS,mBAAmB,iCAAiC;AAC7D,SAAS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AAAA,EACxC,kBAAkB,UAAU,QAAQ;AAAA,IAClC;AAAA;AAAA;AAAA,EAGF,EAAE;AAAA,EACF,QAAQ,UAAU,KAAK,YAAY,uCAAuC,EAAE,aAAa,MAAS;AAAA,EAClG,QAAQ,UAAU,KAAK,YAAY,gCAAgC;AAAA,EACnE,0BAA0B,UAAU,QAAQ,YAAY,4BAA4B;AAAA,EACpF,WAAW,UAAU,KAAK,YAAY,iCAAiC,EAAE,aAAa,IAAI;AAAA,EAC1F,WAAW,UAAU,OAAO,YAAY,WAAW;AAAA,EACnD,aAAa,UAAU,MAAM,CAAC,WAAW,SAAS,CAAC,EAAE,YAAY,iBAAiB,EAAE,aAAa,YAAY,OAAO;AAAA,EACpH,QAAQ,UAAU,OAAO,YAAY,uCAAuC,EAAE,aAAa,MAAS;AAAA,EACpG,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE,YAAY,sCAAsC;AACtH;AAEA,UAAU,cAAc;AACxB,MAAM,oBAAoB,SAAS,SAAS;AAC5C,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -20,7 +20,7 @@ import { setMultipleRefs } from "./utils/setMultipleRefs.js";
20
20
  const useDeprecateComponent = ({ componentName, version }) => {
21
21
  useEffect(() => {
22
22
  if (true)
23
- console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
23
+ console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);
24
24
  }, [componentName, version]);
25
25
  };
26
26
  const DSTooltipV2 = ({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/DSTooltip.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useState, useCallback, useEffect, useRef, useContext } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSPortal } from '@elliemae/ds-portal';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { usePopper } from 'react-popper';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { tooltipPositions } from './utils/tooltipPositions.js';\nimport { TooltipType } from './TooltipType.js';\nimport {\n StyledTooltipContainer,\n StyledTriggerComponentContainer,\n StyledTooltipText,\n StyledAnimatedTooltip,\n} from './styles.js';\nimport { DSTooltipArrow } from './DSTooltipArrow.js';\nimport type { DSTooltipT } from './index.js';\nimport { tooltipV2Props } from './propTypes.js';\nimport { setMultipleRefs } from './utils/setMultipleRefs.js';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.error(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltipV2 = ({\n containerProps = {},\n innerRef,\n placement = tooltipPositions.BOTTOM,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n triggerComponent = null,\n className = '',\n getIsOpen = () => null,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n offset = [0, 14],\n zIndex,\n extraModifiers = {},\n}: DSTooltipT): React.ReactElement => {\n useDeprecateComponent({ componentName: 'ds-tooltip-v2', version: 'TBD Date: 2023 Q3' });\n\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState(triggerComponent);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const timerOpen = useRef<NodeJS.Timeout>();\n const timerClosed = useRef<NodeJS.Timeout>();\n\n const { styles, attributes } = usePopper(referenceElement as HTMLElement | null, popperElement, {\n placement,\n modifiers: [\n { name: 'hide', enabled: true },\n {\n name: 'offset',\n enabled: true,\n options: {\n offset: tooltipType === TooltipType.TOOLBAR ? [0, 0] : offset,\n },\n },\n { name: 'arrow', options: { element: arrowElement } },\n { ...extraModifiers },\n ],\n });\n\n const handleShowTooltipOn = useCallback(() => {\n timerOpen.current = setTimeout(() => {\n setShowTooltip(true);\n setIsAnimating(true);\n getIsOpen(true);\n onOpen();\n }, delayOpen);\n }, [delayOpen, getIsOpen, onOpen]);\n\n const handleShowTooltipOff = useCallback(() => {\n timerClosed.current = setTimeout(() => {\n setShowTooltip(false);\n setIsAnimating(true);\n getIsOpen(false);\n }, delayClose);\n }, [delayClose, getIsOpen]);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n (e.target as HTMLElement).blur();\n }\n }, []);\n\n const checkAnimationStatus = useCallback(() => {\n if (!showTooltip) {\n setIsAnimating(false);\n }\n }, [showTooltip]);\n\n useEffect(\n () => () => {\n clearTimeout(timerClosed.current);\n clearTimeout(timerOpen.current);\n },\n [],\n );\n\n const theme = useContext(ThemeContext);\n\n return (\n <>\n <StyledTriggerComponentContainer\n innerRef={setReferenceElement as unknown as React.RefObject<HTMLDivElement>}\n onMouseEnter={handleShowTooltipOn}\n onMouseLeave={handleShowTooltipOff}\n onFocus={handleShowTooltipOn}\n onBlur={handleShowTooltipOff}\n onKeyDown={handleKeyDown}\n >\n {triggerComponent}\n </StyledTriggerComponentContainer>\n {isAnimating || showTooltip ? (\n <DSPortal>\n <StyledTooltipContainer\n className={className}\n showTooltip={showTooltip}\n tooltipType={tooltipType}\n data-testid=\"ds-tooltip-container\"\n innerRef={(ref) => setMultipleRefs(setPopperElement, innerRef)(ref)}\n style={{ ...styles.popper, zIndex: zIndex ?? theme.zIndex.tooltip }}\n {...containerProps}\n {...attributes.popper}\n >\n <StyledAnimatedTooltip\n showTooltip={showTooltip}\n data-testid=\"ds-tooltip\"\n onAnimationEnd={checkAnimationStatus}\n >\n <StyledTooltipText>{title}</StyledTooltipText>\n {tooltipType === TooltipType.TOOLTIP && showArrow ? (\n <DSTooltipArrow\n arrowElementRef={setArrowElement}\n style={styles.arrow}\n placement={attributes.popper ? attributes.popper['data-popper-placement'] : 'bottom'}\n />\n ) : null}\n </StyledAnimatedTooltip>\n </StyledTooltipContainer>\n </DSPortal>\n ) : null}\n </>\n );\n};\n\nDSTooltipV2.displayName = 'DSTooltipV2';\nconst TooltipV2WithSchema = describe(DSTooltipV2);\nTooltipV2WithSchema.propTypes = tooltipV2Props;\n\nexport { DSTooltipV2, TooltipV2WithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACsHnB,mBACE,KAsBM,YAvBR;AAlHJ,SAAgB,UAAU,aAAa,WAAW,QAAQ,kBAAkB;AAC5E,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAE/B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAOhC,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AACnE,YAAU,MAAM;AACd,QAAI;AACF,cAAQ,MAAM,YAAY,aAAa,oDAAoD,OAAO,GAAG;AAAA,EACzG,GAAG,CAAC,eAAe,OAAO,CAAC;AAC7B;AAEA,MAAM,cAAc,CAAC;AAAA,EACnB,iBAAiB,CAAC;AAAA,EAClB;AAAA,EACA,YAAY,iBAAiB;AAAA,EAC7B,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,YAAY,MAAM;AAAA,EAClB,SAAS,MAAM;AAAA,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AAAA;AAAA,QACN;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,sBAAsB,SAAS,WAAW;AAChD,oBAAoB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable eslint-comments/no-unlimited-disable */\n/* eslint-disable */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport React, { useState, useCallback, useEffect, useRef, useContext } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSPortal } from '@elliemae/ds-portal';\nimport { DEFAULT_DELAY_OPEN, DEFAULT_DELAY_CLOSE } from '@elliemae/ds-shared';\nimport { usePopper } from 'react-popper';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { tooltipPositions } from './utils/tooltipPositions.js';\nimport { TooltipType } from './TooltipType.js';\nimport {\n StyledTooltipContainer,\n StyledTriggerComponentContainer,\n StyledTooltipText,\n StyledAnimatedTooltip,\n} from './styles.js';\nimport { DSTooltipArrow } from './DSTooltipArrow.js';\nimport type { DSTooltipT } from './index.js';\nimport { tooltipV2Props } from './propTypes.js';\nimport { setMultipleRefs } from './utils/setMultipleRefs.js';\n\ninterface Props {\n componentName: string;\n version: string;\n}\n\nconst useDeprecateComponent = ({ componentName, version }: Props) => {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production')\n console.warn(`Warning: ${componentName}:: this component will be deprecated in version: ${version}.`);\n }, [componentName, version]);\n};\n\nconst DSTooltipV2 = ({\n containerProps = {},\n innerRef,\n placement = tooltipPositions.BOTTOM,\n title = '',\n delayClose = DEFAULT_DELAY_CLOSE,\n delayOpen = DEFAULT_DELAY_OPEN,\n triggerComponent = null,\n className = '',\n getIsOpen = () => null,\n onOpen = () => null,\n tooltipType = TooltipType.TOOLTIP,\n showArrow = true,\n offset = [0, 14],\n zIndex,\n extraModifiers = {},\n}: DSTooltipT): React.ReactElement => {\n useDeprecateComponent({ componentName: 'ds-tooltip-v2', version: 'TBD Date: 2023 Q3' });\n\n const [showTooltip, setShowTooltip] = useState<boolean>(false);\n const [isAnimating, setIsAnimating] = useState<boolean>(false);\n const [referenceElement, setReferenceElement] = useState(triggerComponent);\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);\n const timerOpen = useRef<NodeJS.Timeout>();\n const timerClosed = useRef<NodeJS.Timeout>();\n\n const { styles, attributes } = usePopper(referenceElement as HTMLElement | null, popperElement, {\n placement,\n modifiers: [\n { name: 'hide', enabled: true },\n {\n name: 'offset',\n enabled: true,\n options: {\n offset: tooltipType === TooltipType.TOOLBAR ? [0, 0] : offset,\n },\n },\n { name: 'arrow', options: { element: arrowElement } },\n { ...extraModifiers },\n ],\n });\n\n const handleShowTooltipOn = useCallback(() => {\n timerOpen.current = setTimeout(() => {\n setShowTooltip(true);\n setIsAnimating(true);\n getIsOpen(true);\n onOpen();\n }, delayOpen);\n }, [delayOpen, getIsOpen, onOpen]);\n\n const handleShowTooltipOff = useCallback(() => {\n timerClosed.current = setTimeout(() => {\n setShowTooltip(false);\n setIsAnimating(true);\n getIsOpen(false);\n }, delayClose);\n }, [delayClose, getIsOpen]);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n (e.target as HTMLElement).blur();\n }\n }, []);\n\n const checkAnimationStatus = useCallback(() => {\n if (!showTooltip) {\n setIsAnimating(false);\n }\n }, [showTooltip]);\n\n useEffect(\n () => () => {\n clearTimeout(timerClosed.current);\n clearTimeout(timerOpen.current);\n },\n [],\n );\n\n const theme = useContext(ThemeContext);\n\n return (\n <>\n <StyledTriggerComponentContainer\n innerRef={setReferenceElement as unknown as React.RefObject<HTMLDivElement>}\n onMouseEnter={handleShowTooltipOn}\n onMouseLeave={handleShowTooltipOff}\n onFocus={handleShowTooltipOn}\n onBlur={handleShowTooltipOff}\n onKeyDown={handleKeyDown}\n >\n {triggerComponent}\n </StyledTriggerComponentContainer>\n {isAnimating || showTooltip ? (\n <DSPortal>\n <StyledTooltipContainer\n className={className}\n showTooltip={showTooltip}\n tooltipType={tooltipType}\n data-testid=\"ds-tooltip-container\"\n innerRef={(ref) => setMultipleRefs(setPopperElement, innerRef)(ref)}\n style={{ ...styles.popper, zIndex: zIndex ?? theme.zIndex.tooltip }}\n {...containerProps}\n {...attributes.popper}\n >\n <StyledAnimatedTooltip\n showTooltip={showTooltip}\n data-testid=\"ds-tooltip\"\n onAnimationEnd={checkAnimationStatus}\n >\n <StyledTooltipText>{title}</StyledTooltipText>\n {tooltipType === TooltipType.TOOLTIP && showArrow ? (\n <DSTooltipArrow\n arrowElementRef={setArrowElement}\n style={styles.arrow}\n placement={attributes.popper ? attributes.popper['data-popper-placement'] : 'bottom'}\n />\n ) : null}\n </StyledAnimatedTooltip>\n </StyledTooltipContainer>\n </DSPortal>\n ) : null}\n </>\n );\n};\n\nDSTooltipV2.displayName = 'DSTooltipV2';\nconst TooltipV2WithSchema = describe(DSTooltipV2);\nTooltipV2WithSchema.propTypes = tooltipV2Props;\n\nexport { DSTooltipV2, TooltipV2WithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsHnB,mBACE,KAsBM,YAvBR;AAlHJ,SAAgB,UAAU,aAAa,WAAW,QAAQ,kBAAkB;AAC5E,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAE/B,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAOhC,MAAM,wBAAwB,CAAC,EAAE,eAAe,QAAQ,MAAa;AACnE,YAAU,MAAM;AACd,QAAI;AACF,cAAQ,KAAK,YAAY,aAAa,oDAAoD,OAAO,GAAG;A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A;AAAA,YACC;AAAA,YACA,eAAY;AAAA,YACZ,gBAAgB;AAAA,YAEhB;AAAA,kCAAC,qBAAmB,iBAAM;AAAA,cACzB,gBAAgB,YAAY,WAAW,YACtC;AAAA,gBAAC;AAAA;AAAA,kBACC,iBAAiB;AAAA,kBACjB,OAAO,OAAO;AAAA,kBACd,WAAW,WAAW,SAAS,WAAW,OAAO,uBAAuB,IAAI;AAAA;AAAA,cAC9E,IACE;AAAA;AAAA;AAAA,QACN;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,sBAAsB,SAAS,WAAW;AAChD,oBAAoB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -15,7 +15,7 @@ import {
15
15
  StyledTriggerWrapper
16
16
  } from "./styles.js";
17
17
  const DSTooltipV3 = (props) => {
18
- const { text, children, onOpen, onClose, id, textAlign, wrapWords, ...extraPopperJsProps } = useMemoMergePropsWithDefault(props, defaultProps);
18
+ const { text, children, onOpen, onClose, id, textAlign, wrapWords, applyTooltipOverflowWrap, ...extraPopperJsProps } = useMemoMergePropsWithDefault(props, defaultProps);
19
19
  const theme = useContext(ThemeContext);
20
20
  const config = React2.useMemo(() => ({ onOpen, onClose }), [onOpen, onClose]);
21
21
  const tooltipHelpers = useHeadlessTooltip(config);
@@ -44,7 +44,16 @@ const DSTooltipV3 = (props) => {
44
44
  zIndex: theme.zIndex.tooltip,
45
45
  ...extraPopperJsProps,
46
46
  children: /* @__PURE__ */ jsx("div", { "data-testid": `${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== "" ? `_${id}` : ""}`, children: /* @__PURE__ */ jsxs(StyledTooltipContainer, { children: [
47
- /* @__PURE__ */ jsx(StyledTooltipText, { "aria-label": text, textAlign, wrapWords, children: text }),
47
+ /* @__PURE__ */ jsx(
48
+ StyledTooltipText,
49
+ {
50
+ "aria-label": text,
51
+ textAlign,
52
+ wrapWords,
53
+ $applyTooltipOverflowWrap: applyTooltipOverflowWrap,
54
+ children: text
55
+ }
56
+ ),
48
57
  /* @__PURE__ */ jsx(StyledMouseOverDetectionBox, {})
49
58
  ] }) })
50
59
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v3/DSTooltipV3.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport { useMemoMergePropsWithDefault, describe } from '@elliemae/ds-props-helpers';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport { defaultProps } from './defaultProps.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, wrapWords, ...extraPopperJsProps } =\n useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(props, defaultProps);\n\n const theme = useContext(ThemeContext);\n const config = React.useMemo(() => ({ onOpen, onClose }), [onOpen, onClose]);\n const tooltipHelpers = useHeadlessTooltip(config);\n\n React.useEffect(() => {\n if (extraPopperJsProps.showPopover === false) {\n tooltipHelpers.hideTooltip();\n }\n }, [extraPopperJsProps.showPopover, tooltipHelpers]);\n return (\n <StyledTriggerWrapper\n onMouseEnter={tooltipHelpers.onMouseEnter}\n onMouseLeave={tooltipHelpers.onMouseLeave}\n onPointerEnter={tooltipHelpers.onMouseEnter}\n onPointerLeave={tooltipHelpers.onMouseLeave}\n onFocus={tooltipHelpers.onFocus}\n onBlur={tooltipHelpers.onBlur}\n innerRef={tooltipHelpers.setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <DSPopperJS\n referenceElement={tooltipHelpers.referenceElement}\n showPopover={tooltipHelpers.shouldShowPopover}\n zIndex={theme.zIndex.tooltip}\n {...extraPopperJsProps}\n >\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText aria-label={text} textAlign={textAlign} wrapWords={wrapWords}>\n {text}\n </StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = 'DSTooltipV3';\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = propTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\n\nexport default DSTooltipV3;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACgDb,SACE,KADF;AA/CV,OAAOA,UAAS,kBAAkB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AACnC,SAAS,8BAA8B,gBAAgB;AACvD,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,MAAM,UAAU,QAAQ,SAAS,IAAI,WAAW,WAAW,GAAG,mBAAmB,IACvF,6BAAyD,OAAO,YAAY;AAE9E,QAAM,QAAQ,WAAW,YAAY;AACrC,QAAM,SAASA,OAAM,QAAQ,OAAO,EAAE,QAAQ,QAAQ,IAAI,CAAC,QAAQ,OAAO,CAAC;AAC3E,QAAM,iBAAiB,mBAAmB,MAAM;AAEhD,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,mBAAmB,gBAAgB,OAAO;AAC5C,qBAAe,YAAY;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,mBAAmB,aAAa,cAAc,CAAC;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,eAAe;AAAA,MAC7B,cAAc,eAAe;AAAA,MAC7B,gBAAgB,eAAe;AAAA,MAC/B,gBAAgB,eAAe;AAAA,MAC/B,SAAS,eAAe;AAAA,MACxB,QAAQ,eAAe;AAAA,MACvB,UAAU,eAAe;AAAA,MACzB,eAAa,GAAG,oBAAoB,eAAe,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE;AAAA,MAE/E;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,kBAAkB,eAAe;AAAA,YACjC,aAAa,eAAe;AAAA,YAC5B,QAAQ,MAAM,OAAO;AAAA,YACpB,GAAG;AAAA,YAEJ,8BAAC,SAAI,eAAa,GAAG,oBAAoB,oBAAoB,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE,IACvF,+BAAC,0BACC;AAAA,kCAAC,qBAAkB,cAAY,MAAM,WAAsB,WACxD,gBACH;AAAA,cACA,oBAAC,+BAA4B;AAAA,eAC/B,GACF;AAAA;AAAA,QACF;AAAA,QAEC;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { useHeadlessTooltip } from '@elliemae/ds-hooks-headless-tooltip';\nimport { useMemoMergePropsWithDefault, describe } from '@elliemae/ds-props-helpers';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport { defaultProps } from './defaultProps.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { text, children, onOpen, onClose, id, textAlign, wrapWords, applyTooltipOverflowWrap, ...extraPopperJsProps } =\n useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(props, defaultProps);\n\n const theme = useContext(ThemeContext);\n const config = React.useMemo(() => ({ onOpen, onClose }), [onOpen, onClose]);\n const tooltipHelpers = useHeadlessTooltip(config);\n\n React.useEffect(() => {\n if (extraPopperJsProps.showPopover === false) {\n tooltipHelpers.hideTooltip();\n }\n }, [extraPopperJsProps.showPopover, tooltipHelpers]);\n return (\n <StyledTriggerWrapper\n onMouseEnter={tooltipHelpers.onMouseEnter}\n onMouseLeave={tooltipHelpers.onMouseLeave}\n onPointerEnter={tooltipHelpers.onMouseEnter}\n onPointerLeave={tooltipHelpers.onMouseLeave}\n onFocus={tooltipHelpers.onFocus}\n onBlur={tooltipHelpers.onBlur}\n innerRef={tooltipHelpers.setReferenceElement}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <DSPopperJS\n referenceElement={tooltipHelpers.referenceElement}\n showPopover={tooltipHelpers.shouldShowPopover}\n zIndex={theme.zIndex.tooltip}\n {...extraPopperJsProps}\n >\n <div data-testid={`${TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}${id !== '' ? `_${id}` : ''}`}>\n <StyledTooltipContainer>\n <StyledTooltipText\n aria-label={text}\n textAlign={textAlign}\n wrapWords={wrapWords}\n $applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n {text}\n </StyledTooltipText>\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n </div>\n </DSPopperJS>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = 'DSTooltipV3';\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = propTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\n\nexport default DSTooltipV3;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgDb,SACE,KADF;AA/CV,OAAOA,UAAS,kBAAkB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,0BAA0B;AACnC,SAAS,8BAA8B,gBAAgB;AACvD,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,MAAM,UAAU,QAAQ,SAAS,IAAI,WAAW,WAAW,0BAA0B,GAAG,mBAAmB,IACjH,6BAAyD,OAAO,YAAY;AAE9E,QAAM,QAAQ,WAAW,YAAY;AACrC,QAAM,SAASA,OAAM,QAAQ,OAAO,EAAE,QAAQ,QAAQ,IAAI,CAAC,QAAQ,OAAO,CAAC;AAC3E,QAAM,iBAAiB,mBAAmB,MAAM;AAEhD,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,mBAAmB,gBAAgB,OAAO;AAC5C,qBAAe,YAAY;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,mBAAmB,aAAa,cAAc,CAAC;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,eAAe;AAAA,MAC7B,cAAc,eAAe;AAAA,MAC7B,gBAAgB,eAAe;AAAA,MAC/B,gBAAgB,eAAe;AAAA,MAC/B,SAAS,eAAe;AAAA,MACxB,QAAQ,eAAe;AAAA,MACvB,UAAU,eAAe;AAAA,MACzB,eAAa,GAAG,oBAAoB,eAAe,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE;AAAA,MAE/E;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,kBAAkB,eAAe;AAAA,YACjC,aAAa,eAAe;AAAA,YAC5B,QAAQ,MAAM,OAAO;AAAA,YACpB,GAAG;AAAA,YAEJ,8BAAC,SAAI,eAAa,GAAG,oBAAoB,oBAAoB,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE,IACvF,+BAAC,0BACC;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,cAAY;AAAA,kBACZ;AAAA,kBACA;AAAA,kBACA,2BAA2B;AAAA,kBAE1B;AAAA;AAAA,cACH;AAAA,cACA,oBAAC,+BAA4B;AAAA,eAC/B,GACF;AAAA;AAAA,QACF;AAAA,QAEC;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,wBAAwB,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -6,7 +6,8 @@ const defaultProps = {
6
6
  onClose: noop,
7
7
  id: "",
8
8
  textAlign: "left",
9
- wrapWords: false
9
+ wrapWords: false,
10
+ applyTooltipOverflowWrap: false
10
11
  };
11
12
  export {
12
13
  defaultProps
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v3/defaultProps.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nexport const defaultProps: DSTooltipV3T.DefaultProps = {\n onOpen: noop,\n onClose: noop,\n id: '',\n textAlign: 'left',\n wrapWords: false,\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,eAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AACb;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSTooltipV3T } from './react-desc-prop-types.js';\n\nconst noop = () => {};\n\nexport const defaultProps: DSTooltipV3T.DefaultProps = {\n onOpen: noop,\n onClose: noop,\n id: '',\n textAlign: 'left',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,MAAM,OAAO,MAAM;AAAC;AAEb,MAAM,eAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,0BAA0B;AAC5B;",
6
6
  "names": []
7
7
  }
@@ -4,6 +4,9 @@ import { PLACEMENT, TEXT_ALIGNMENT } from "./constants.js";
4
4
  const propTypes = {
5
5
  text: PropTypes.string.description("Tooltip text to be displayed on hover/focus").isRequired,
6
6
  textAlign: PropTypes.oneOf(TEXT_ALIGNMENT).description("Tooltip text alignment").defaultValue("left"),
7
+ applyTooltipOverflowWrap: PropTypes.bool.description(
8
+ "when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap"
9
+ ).defaultValue(false),
7
10
  wrapWords: PropTypes.bool.description("Break words into a new line. Useful when words exceed tooltip max-lenght.").defaultValue(false),
8
11
  children: PropTypes.node.description("Element to tie the tooltip to, must be a single node").isRequired,
9
12
  withoutPortal: PropTypes.bool.description("Whether or not the tooltip content should appear in a DOM portal or not").defaultValue(true),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v3/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\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 export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n ariaLabel?: string;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuration?: number;\n portalDOMContainer?: HTMLElement;\n startPlacementPreference?: Placement;\n placementOrderPreference?: Placement[];\n customOffset?: [number, number];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n text: string;\n }\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n textAlign: PropTypes.oneOf(TEXT_ALIGNMENT as unknown as unknown[])\n .description('Tooltip text alignment')\n .defaultValue('left'),\n wrapWords: PropTypes.bool\n .description('Break words into a new line. Useful when words exceed tooltip max-lenght.')\n .defaultValue(false),\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\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 withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])])\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n startPlacementPreference: PropTypes.oneOf(PLACEMENT)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(PLACEMENT))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n} as WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,sBAAsB;AA6DnC,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,OAAO,YAAY,6CAA6C,EAAE;AAAA,EAClF,WAAW,UAAU,MAAM,cAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,WAAW,UAAU,KAClB,YAAY,2EAA2E,EACvF,aAAa,KAAK;AAAA,EACrB,UAAU,UAAU,KAAK,YAAY,sDAAsD,EAAE;AAAA,EAC7F,eAAe,UAAU,KACtB,YAAY,yEAAyE,EACrF,aAAa,IAAI;AAAA,EACpB,cAAc,UAAU,KAAK,YAAY,iDAAiD,EAAE,aAAa,KAAK;AAAA,EAC9G,iBAAiB,UAAU,QACxB;AAAA,IACC;AAAA,EAEF,EACC,aAAa,MAAS;AAAA,EACzB,kBAAkB,UAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EACrB,mBAAmB,UAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EACjH,oBAAoB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAC9E,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EACzB,0BAA0B,UAAU,MAAM,SAAS,EAChD,YAAY,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EACvB,0BAA0B,UAAU,QAAQ,UAAU,MAAM,SAAS,CAAC,EACnE,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EACpD,QAAQ,UAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAC/E,cAAc,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;AAAA,EAC5G,WAAW,UAAU,MAClB,YAAY,+FAA+F,EAC3G,aAAa,CAAC;AAAA,EACjB,IAAI,UAAU,OAAO,YAAY,qCAAqC,EAAE,aAAa,EAAE;AAAA,EACvF,QAAQ,UAAU,KAAK,YAAY,wDAAwD,EAAE,aAAa,UAAU;AAAA,EACpH,SAAS,UAAU,KAChB,YAAY,yDAAyD,EACrE,aAAa,UAAU;AAC5B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { PLACEMENT, TEXT_ALIGNMENT } from './constants.js';\n\nexport declare namespace DSTooltipV3T {\n export type Placement =\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 export type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';\n\n export interface DefaultProps {\n onOpen: () => void;\n onClose: () => void;\n id: string;\n textAlign: TextAlignment;\n wrapWords: boolean;\n applyTooltipOverflowWrap: boolean;\n }\n\n export interface OptionalProps {\n zIndex?: number;\n ariaLabel?: string;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuration?: number;\n portalDOMContainer?: HTMLElement;\n startPlacementPreference?: Placement;\n placementOrderPreference?: Placement[];\n customOffset?: [number, number];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\n text: string;\n }\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>,\n // XstyledProps,\n RequiredProps {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Tooltip text to be displayed on hover/focus').isRequired,\n textAlign: PropTypes.oneOf(TEXT_ALIGNMENT as unknown as unknown[])\n .description('Tooltip text alignment')\n .defaultValue('left'),\n applyTooltipOverflowWrap: PropTypes.bool\n .description(\n 'when a tooltip is present, the tooltip text may be too long to fit in the pill. If true, the tooltip will wrap to the next line using overflow-wrap',\n )\n .defaultValue(false),\n wrapWords: PropTypes.bool\n .description('Break words into a new line. Useful when words exceed tooltip max-lenght.')\n .defaultValue(false),\n children: PropTypes.node.description('Element to tie the tooltip to, must be a single node').isRequired,\n withoutPortal: PropTypes.bool\n .description('Whether or not the tooltip content should appear in a DOM portal or not')\n .defaultValue(true),\n withoutArrow: PropTypes.bool.description('Whether or not the tooltip should use the arrow').defaultValue(false),\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 withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n portalDOMContainer: PropTypes.oneOfType([PropTypes.node, PropTypes.oneOf([null])])\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n startPlacementPreference: PropTypes.oneOf(PLACEMENT)\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n placementOrderPreference: PropTypes.arrayOf(PropTypes.oneOf(PLACEMENT))\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue([0, 14]),\n modifiers: PropTypes.array\n .description('modifiers array for full-custom tooltip-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n id: PropTypes.string.description('Optional id appended to data-testid').defaultValue(''),\n onOpen: PropTypes.func.description('Optional callback to be invoked when the tooltip opens').defaultValue('() => {}'),\n onClose: PropTypes.func\n .description('Optional callback to be invoked when the tooltip closes')\n .defaultValue('() => {}'),\n} as WeakValidationMap<unknown>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,sBAAsB;AA8DnC,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,OAAO,YAAY,6CAA6C,EAAE;AAAA,EAClF,WAAW,UAAU,MAAM,cAAsC,EAC9D,YAAY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KAChB,YAAY,yDAAyD,EACrE,aAAa,UAAU;AAC5B;",
6
6
  "names": []
7
7
  }
@@ -17,10 +17,21 @@ const StyledTooltipContainer = styled.div`
17
17
  const StyledTooltipText = styled.div`
18
18
  display: inline-block;
19
19
  text-align: ${({ textAlign }) => textAlign};
20
- white-space: ${({ wrapWords }) => wrapWords ? "pre-wrap" : "normal"};
21
- word-break: ${({ wrapWords }) => wrapWords ? "break-all" : "normal"};
22
- word-wrap: break-word;
23
- overflow-wrap: break-word;
20
+
21
+ ${({ wrapWords, $applyTooltipOverflowWrap }) => {
22
+ if ($applyTooltipOverflowWrap) {
23
+ return `overflow-wrap: break-word;
24
+ white-space: pre-wrap;
25
+ min-width: 0px;`;
26
+ }
27
+ if (wrapWords) {
28
+ return `white-space: pre-wrap;
29
+ word-break: break-all;
30
+ overflow-wrap: break-word;`;
31
+ }
32
+ return `white-space: normal;
33
+ overflow-wrap: break-word;`;
34
+ }};
24
35
  `;
25
36
  const StyledMouseOverDetectionBox = styled.div`
26
37
  position: absolute;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/v3/styles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\ninterface StyledTooltipTextT {\n wrapWords: boolean;\n textAlign: DSTooltipV3T.TextAlignment;\n}\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<StyledTooltipTextT>`\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n white-space: ${({ wrapWords }) => (wrapWords ? 'pre-wrap' : 'normal')};\n word-break: ${({ wrapWords }) => (wrapWords ? 'break-all' : 'normal')};\n word-wrap: break-word;\n overflow-wrap: break-word;\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-flex;\n width: 100%;\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAQhB,MAAM,yBAAyB,OAAO;AAAA;AAAA,eAE9B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAK9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAG5C,MAAM,oBAAoB,OAAO;AAAA;AAAA,gBAExB,CAAC,EAAE,UAAU,MAAM,SAAS;AAAA,iBAC3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,QAAS;AAAA,gBACvD,CAAC,EAAE,UAAU,MAAO,YAAY,cAAc,QAAS;AAAA;AAAA;AAAA;AAKhE,MAAM,8BAA8B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS3C,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\n\ninterface StyledTooltipTextT {\n wrapWords: boolean;\n textAlign: DSTooltipV3T.TextAlignment;\n}\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<StyledTooltipTextT & { $applyTooltipOverflowWrap: boolean }>`\n display: inline-block;\n text-align: ${({ textAlign }) => textAlign};\n\n ${({ wrapWords, $applyTooltipOverflowWrap }) => {\n if ($applyTooltipOverflowWrap) {\n // word-wrap: break-word; // <- this is the legacy \"overflow-wrap\" property, we should not need the legacy declaration\n // min-width: 0px; // <-- min-width:0px is needed because css grid auto-sizing are broken in css and impossible to understand\n return `overflow-wrap: break-word;\n white-space: pre-wrap;\n min-width: 0px;`;\n }\n if (wrapWords) {\n return `white-space: pre-wrap;\n word-break: break-all;\n overflow-wrap: break-word;`;\n }\n return `white-space: normal;\n overflow-wrap: break-word;`;\n }};\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-flex;\n width: 100%;\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAQhB,MAAM,yBAAyB,OAAO;AAAA;AAAA,eAE9B,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,aAK9B,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,IAAI,IAAI,MAAM,MAAM,EAAE,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA;AAG5C,MAAM,oBAAoB,OAAO;AAAA;AAAA,gBAExB,CAAC,EAAE,UAAU,MAAM,SAAS;AAAA;AAAA,IAExC,CAAC,EAAE,WAAW,0BAA0B,MAAM;AAC9C,MAAI,2BAA2B;AAG7B,WAAO;AAAA;AAAA;AAAA,EAGT;AACA,MAAI,WAAW;AACb,WAAO;AAAA;AAAA;AAAA,EAGT;AACA,SAAO;AAAA;AAET,CAAC;AAAA;AAGI,MAAM,8BAA8B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS3C,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,12 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { DSTooltipV3 } from "../index.js";
4
- const mockChildren = () => /* @__PURE__ */ jsx("div", {});
5
4
  const mockPlacementOrderPreference = ["bottom-start", "bottom", "bottom-end"];
6
5
  const mockCustomOffset = [0, 0];
7
6
  const mockModifiers = [{}];
8
7
  const testRequiredProps = {
9
- children: mockChildren(),
10
8
  text: ""
11
9
  };
12
10
  const testOptionalProps = {
@@ -48,7 +46,8 @@ const testCompleteDefaults = {
48
46
  onClose: () => {
49
47
  },
50
48
  textAlign: "center",
51
- wrapWords: false
49
+ wrapWords: false,
50
+ applyTooltipOverflowWrap: false
52
51
  };
53
52
  const testInternalProps = {
54
53
  ...testRequiredProps,
@@ -68,7 +67,7 @@ const testExplicitDefinition = {
68
67
  },
69
68
  textAlign: "center",
70
69
  wrapWords: false,
71
- children: mockChildren(),
70
+ applyTooltipOverflowWrap: false,
72
71
  text: "",
73
72
  zIndex: 1,
74
73
  ariaLabel: "",
@@ -92,7 +91,7 @@ const testInferedTypeCompatibility = {
92
91
  },
93
92
  textAlign: "center",
94
93
  wrapWords: false,
95
- children: mockChildren(),
94
+ applyTooltipOverflowWrap: false,
96
95
  text: "",
97
96
  zIndex: 1,
98
97
  ariaLabel: "",
@@ -116,7 +115,6 @@ const testDefinitionAsConst = {
116
115
  },
117
116
  textAlign: "center",
118
117
  wrapWords: false,
119
- children: mockChildren(),
120
118
  text: "",
121
119
  zIndex: 1,
122
120
  ariaLabel: "",
@@ -133,9 +131,9 @@ const testDefinitionAsConst = {
133
131
  showPopover: true
134
132
  };
135
133
  const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
136
- /* @__PURE__ */ jsx(DSTooltipV3, { ...testExplicitDefinition }),
137
- /* @__PURE__ */ jsx(DSTooltipV3, { ...testInferedTypeCompatibility }),
138
- /* @__PURE__ */ jsx(DSTooltipV3, { ...testDefinitionAsConst }),
134
+ /* @__PURE__ */ jsx(DSTooltipV3, { ...testExplicitDefinition, children: /* @__PURE__ */ jsx("div", {}) }),
135
+ /* @__PURE__ */ jsx(DSTooltipV3, { ...testInferedTypeCompatibility, children: /* @__PURE__ */ jsx("div", {}) }),
136
+ /* @__PURE__ */ jsx(DSTooltipV3, { ...testDefinitionAsConst, children: /* @__PURE__ */ jsx("div", {}) }),
139
137
  /* @__PURE__ */ jsx(
140
138
  DSTooltipV3,
141
139
  {
@@ -146,7 +144,6 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
146
144
  },
147
145
  textAlign: "center",
148
146
  wrapWords: false,
149
- children: mockChildren(),
150
147
  text: "",
151
148
  zIndex: 1,
152
149
  ariaLabel: "",
@@ -160,7 +157,9 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
160
157
  placementOrderPreference: ["bottom-start", "bottom", "bottom-end"],
161
158
  customOffset: [0, 0],
162
159
  modifiers: [],
163
- showPopover: true
160
+ showPopover: true,
161
+ applyTooltipOverflowWrap: false,
162
+ children: /* @__PURE__ */ jsx("div", {})
164
163
  }
165
164
  )
166
165
  ] });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/v3/typescript-testing/typescript-tooltip-v3-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSTooltipV3 } from '../index.js';\nimport type { DSTooltipV3T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSTooltipV3T.Props;\ntype ComponentPropsInternals = DSTooltipV3T.InternalProps;\ntype ComponentPropsDefaultProps = DSTooltipV3T.DefaultProps;\ntype ComponentPropsOptionalProps = DSTooltipV3T.OptionalProps;\ntype ComponentPropsRequiredProps = DSTooltipV3T.RequiredProps;\n\nconst mockChildren = () => <div></div>;\n\nconst mockPlacementOrderPreference: DSTooltipV3T.Placement[] = ['bottom-start', 'bottom', 'bottom-end'];\nconst mockCustomOffset: DSTooltipV3T.OptionalProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: mockChildren(),\n text: '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n id: '',\n onOpen: () => {},\n onClose: () => {},\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n children: mockChildren(),\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n children: mockChildren(),\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n children: mockChildren(),\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSTooltipV3 {...testExplicitDefinition} />\n <DSTooltipV3 {...testInferedTypeCompatibility} />\n <DSTooltipV3 {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSTooltipV3\n id=\"id\"\n onOpen={() => {}}\n onClose={() => {}}\n textAlign=\"center\"\n wrapWords={false}\n children={mockChildren()}\n text=\"\"\n zIndex={1}\n ariaLabel=\"\"\n withoutPortal={false}\n withoutArrow={false}\n withoutAnimation={false}\n boundaryElement={undefined}\n animationDuration={1000}\n portalDOMContainer={undefined}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={['bottom-start', 'bottom', 'bottom-end']}\n customOffset={[0, 0]}\n modifiers={[]}\n showPopover={true}\n />\n </>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACWI,SA4IzB,UA5IyB,KA4IzB,YA5IyB;AAV3B,SAAS,mBAAmB;AAU5B,MAAM,eAAe,MAAM,oBAAC,SAAI;AAEhC,MAAM,+BAAyD,CAAC,gBAAgB,UAAU,YAAY;AACtG,MAAM,mBAA+D,CAAC,GAAG,CAAC;AAC1E,MAAM,gBAAyD,CAAC,CAAC,CAAC;AAElE,MAAM,oBAAiD;AAAA,EACrD,UAAU,aAAa;AAAA,EACvB,MAAM;AACR;AAEA,MAAM,oBAAiD;AAAA,EACrD,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,eAAe;AAAA,EACf,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,cAAc;AAAA,EACd,WAAW;AAAA,EACX,aAAa;AACf;AAIA,MAAM,sBAA2D;AAAA,EAC/D,IAAI;AAAA,EACJ,QAAQ,MAAM;AAAA,EAAC;AAAA,EACf,SAAS,MAAM;AAAA,EAAC;AAClB;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,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ACd,WAAW;AAAA,EACX,aAAa;AACf;AAEA,MAAM,wBAAwB;AAAA,EAC5B,IAAI;AAAA,EACJ,QAAQ,MAAM;AAAA,EAAC;AAAA,EACf,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,WAAW;AAAA,EACX,WAAW;AAAA,EACX,UAAU,aAAa;AAAA,EACvB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,eAAe;AAAA,EACf,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,cAAc;AAAA,EACd,WAAW;AAAA,EACX,aAAa;AACf;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,eAAa,GAAG,wBAAwB;AAAA,EACzC,oBAAC,eAAa,GAAG,8BAA8B;AAAA,EAC/C,oBAAC,eAAa,GAAG,uBAAuB;AAAA,EAExC;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,QAAQ,MAAM;AAAA,MAAC;AAAA,MACf,SAAS,MAAM;AAAA,MAAC;AAAA,MAChB,WAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU,aAAa;AAAA,MACvB,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,WAAU;AAAA,MACV,eAAe;AAAA,MACf,cAAc;AAAA,MACd,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,0BAAyB;AAAA,MACzB,0BAA0B,CAAC,gBAAgB,UAAU,YAAY;AAAA,MACjE,cAAc,CAAC,GAAG,CAAC;AAAA,MACnB,WAAW,CAAC;AAAA,MACZ,aAAa;AAAA;AAAA,EACf;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { DSTooltipV3 } from '../index.js';\nimport type { DSTooltipV3T } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSTooltipV3T.Props;\ntype ComponentPropsInternals = DSTooltipV3T.InternalProps;\ntype ComponentPropsDefaultProps = DSTooltipV3T.DefaultProps;\ntype ComponentPropsOptionalProps = DSTooltipV3T.OptionalProps;\ntype ComponentPropsRequiredProps = DSTooltipV3T.RequiredProps;\n\nconst mockPlacementOrderPreference: DSTooltipV3T.Placement[] = ['bottom-start', 'bottom', 'bottom-end'];\nconst mockCustomOffset: DSTooltipV3T.OptionalProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testRequiredProps: Omit<ComponentPropsRequiredProps, 'children'> = {\n text: '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n id: '',\n onOpen: () => {},\n onClose: () => {},\n};\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testProps: Omit<ComponentPropsForApp, 'children'> = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n};\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testInternalProps: Omit<ComponentPropsInternals, 'children'> = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// we omit children because children MUST be passed ALWAYS via the JSX composition react pattern\nconst testExplicitDefinition: Omit<ComponentPropsForApp, 'children'> = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n applyTooltipOverflowWrap: false,\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n id: 'id',\n onOpen: () => {},\n onClose: () => {},\n textAlign: 'center',\n wrapWords: false,\n text: '',\n zIndex: 1,\n ariaLabel: '',\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n startPlacementPreference: 'bottom',\n placementOrderPreference: mockPlacementOrderPreference,\n customOffset: mockCustomOffset,\n modifiers: mockModifiers,\n showPopover: true,\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSTooltipV3 {...testExplicitDefinition}>\n <div></div>\n </DSTooltipV3>\n <DSTooltipV3 {...testInferedTypeCompatibility}>\n <div></div>\n </DSTooltipV3>\n <DSTooltipV3 {...testDefinitionAsConst}>\n <div></div>\n </DSTooltipV3>\n {/* works with inline values */}\n <DSTooltipV3\n id=\"id\"\n onOpen={() => {}}\n onClose={() => {}}\n textAlign=\"center\"\n wrapWords={false}\n text=\"\"\n zIndex={1}\n ariaLabel=\"\"\n withoutPortal={false}\n withoutArrow={false}\n withoutAnimation={false}\n boundaryElement={undefined}\n animationDuration={1000}\n portalDOMContainer={undefined}\n startPlacementPreference=\"bottom\"\n placementOrderPreference={['bottom-start', 'bottom', 'bottom-end']}\n customOffset={[0, 0]}\n modifiers={[]}\n showPopover\n applyTooltipOverflowWrap={false}\n >\n <div></div>\n </DSTooltipV3>\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACuJrB,mBAGI,KAHJ;AAtJF,SAAS,mBAAmB;AAU5B,MAAM,+BAAyD,CAAC,gBAAgB,UAAU,YAAY;AACtG,MAAM,mBAA+D,CAAC,GAAG,CAAC;AAC1E,MAAM,gBAAyD,CAAC,CAAC,CAAC;AAGlE,MAAM,oBAAmE;AAAA,EACvE,MAAM;AACR;AAEA,MAAM,oBAAiD;AAAA,EACrD,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,eAAe;AAAA,EACf,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,0BAA0B;AAAA,EAC1B,cAAc;AAAA,EACd,WAAW;AAAA,EACX,aAAa;AACf;AAIA,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c,CAAC,GAAG,CAAC;AAAA,MACnB,WAAW,CAAC;AAAA,MACZ,aAAW;AAAA,MACX,0BAA0B;AAAA,MAE1B,8BAAC,SAAI;AAAA;AAAA,EACP;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -9,6 +9,7 @@ export declare namespace DSTooltipV3T {
9
9
  id: string;
10
10
  textAlign: TextAlignment;
11
11
  wrapWords: boolean;
12
+ applyTooltipOverflowWrap: boolean;
12
13
  }
13
14
  interface OptionalProps {
14
15
  zIndex?: number;
@@ -4,7 +4,9 @@ interface StyledTooltipTextT {
4
4
  textAlign: DSTooltipV3T.TextAlignment;
5
5
  }
6
6
  export declare const StyledTooltipContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
7
- export declare const StyledTooltipText: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledTooltipTextT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
7
+ export declare const StyledTooltipText: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledTooltipTextT & {
8
+ $applyTooltipOverflowWrap: boolean;
9
+ } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
8
10
  export declare const StyledMouseOverDetectionBox: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
9
11
  export declare const StyledTriggerWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
10
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-tooltip",
3
- "version": "3.39.2",
3
+ "version": "3.39.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tooltip",
6
6
  "files": [
@@ -98,23 +98,23 @@
98
98
  "dependencies": {
99
99
  "@popperjs/core": "~2.11.7",
100
100
  "react-popper": "~2.3.0",
101
- "@elliemae/ds-button": "3.39.2",
102
- "@elliemae/ds-hooks-headless-tooltip": "3.39.2",
103
- "@elliemae/ds-popper": "3.39.2",
104
- "@elliemae/ds-classnames": "3.39.2",
105
- "@elliemae/ds-popperjs": "3.39.2",
106
- "@elliemae/ds-portal": "3.39.2",
107
- "@elliemae/ds-props-helpers": "3.39.2",
108
- "@elliemae/ds-system": "3.39.2",
109
- "@elliemae/ds-shared": "3.39.2"
101
+ "@elliemae/ds-button": "3.39.4",
102
+ "@elliemae/ds-popperjs": "3.39.4",
103
+ "@elliemae/ds-props-helpers": "3.39.4",
104
+ "@elliemae/ds-system": "3.39.4",
105
+ "@elliemae/ds-classnames": "3.39.4",
106
+ "@elliemae/ds-portal": "3.39.4",
107
+ "@elliemae/ds-hooks-headless-tooltip": "3.39.4",
108
+ "@elliemae/ds-shared": "3.39.4",
109
+ "@elliemae/ds-popper": "3.39.4"
110
110
  },
111
111
  "devDependencies": {
112
112
  "@elliemae/pui-cli": "9.0.0-next.50",
113
113
  "react": "^17.0.2",
114
114
  "react-dom": "^17.0.2",
115
115
  "styled-components": "~5.3.9",
116
- "@elliemae/ds-monorepo-devops": "3.39.2",
117
- "@elliemae/ds-grid": "3.39.2"
116
+ "@elliemae/ds-monorepo-devops": "3.39.4",
117
+ "@elliemae/ds-grid": "3.39.4"
118
118
  },
119
119
  "peerDependencies": {
120
120
  "react": "^17.0.2",