@elliemae/ds-tooltip-v3 3.53.0-next.4 → 3.53.0-next.6

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.
@@ -62,7 +62,8 @@ const DSTooltipV3 = (props) => {
62
62
  portalDOMContainer,
63
63
  applyTooltipOverflowWrap,
64
64
  showPopover,
65
- Text
65
+ Text,
66
+ textProps
66
67
  } = propsWithDefault;
67
68
  const { handlers, arrowStyles, floatingStyles, isOpen, refs, context } = (0, import_ds_floating_context.useFloatingContext)({
68
69
  placement: startPlacementPreference,
@@ -95,7 +96,7 @@ const DSTooltipV3 = (props) => {
95
96
  context,
96
97
  children: [
97
98
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.StyledTooltipContainer, { "data-testid": import_TooltipV3DatatestId.TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER, children: [
98
- Text ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
+ Text ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { ...textProps ?? {} }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
100
  import_styles.StyledTooltipText,
100
101
  {
101
102
  "data-testid": import_TooltipV3DatatestId.TooltipV3DatatestId.OPINIONATED_TEXT_WRAPPER,
@@ -118,6 +119,6 @@ const DSTooltipV3 = (props) => {
118
119
  };
119
120
  DSTooltipV3.displayName = import_constants.DSTooltipV3Name;
120
121
  const DSTooltipV3WithSchema = (0, import_ds_props_helpers.describe)(DSTooltipV3);
121
- DSTooltipV3WithSchema.propTypes = import_react_desc_prop_types.propTypes;
122
+ DSTooltipV3WithSchema.propTypes = import_react_desc_prop_types.DSTooltipV3PropTypesSchema;
122
123
  var DSTooltipV3_default = DSTooltipV3;
123
124
  //# sourceMappingURL=DSTooltipV3.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSTooltipV3.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\nimport { useTooltipV3 } from './config/useTooltipV3.js';\nimport { DSTooltipV3Name } from './constants.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { propsWithDefault } = useTooltipV3(props);\n\n const {\n text,\n startPlacementPreference,\n children,\n onOpen,\n onClose,\n id,\n textAlign,\n wrapWords,\n withoutArrow,\n customOffset,\n animationDuration,\n withoutAnimation,\n withoutPortal,\n portalDOMContainer,\n applyTooltipOverflowWrap,\n showPopover,\n Text,\n } = propsWithDefault;\n\n const { handlers, arrowStyles, floatingStyles, isOpen, refs, context } = useFloatingContext({\n placement: startPlacementPreference,\n customOffset,\n onOpen,\n onClose,\n withoutPortal,\n withoutAnimation,\n portalDOMContainer,\n animationDuration,\n externallyControlledIsOpen: showPopover,\n });\n\n const isOpenSourceOfTruth = React.useMemo(() => {\n if (showPopover !== undefined) return showPopover;\n return isOpen;\n }, [showPopover, isOpen]);\n\n return (\n <StyledTriggerWrapper\n {...handlers}\n innerRef={refs.setReference}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isOpenSourceOfTruth}\n floatingStyles={floatingStyles}\n context={context}\n >\n <StyledTooltipContainer data-testid={TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}>\n {Text ? (\n <Text />\n ) : (\n <StyledTooltipText\n data-testid={TooltipV3DatatestId.OPINIONATED_TEXT_WRAPPER}\n textAlign={textAlign}\n wrapWords={wrapWords}\n $applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n {text}\n </StyledTooltipText>\n )}\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n {!withoutArrow ? <PopoverArrow {...arrowStyles} /> : null}\n </FloatingWrapper>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = DSTooltipV3Name;\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;ADoEf;AAnER,mBAAkB;AAClB,iCAAkE;AAClE,8BAAyB;AACzB,mCAA0B;AAC1B,iCAAoC;AACpC,oBAKO;AAEP,0BAA6B;AAC7B,uBAAgC;AAEhC,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,iBAAiB,QAAI,kCAAa,KAAK;AAE/C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,UAAU,aAAa,gBAAgB,QAAQ,MAAM,QAAQ,QAAI,+CAAmB;AAAA,IAC1F,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,4BAA4B;AAAA,EAC9B,CAAC;AAED,QAAM,sBAAsB,aAAAA,QAAM,QAAQ,MAAM;AAC9C,QAAI,gBAAgB,OAAW,QAAO;AACtC,WAAO;AAAA,EACT,GAAG,CAAC,aAAa,MAAM,CAAC;AAExB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,KAAK;AAAA,MACf,eAAa,GAAG,+CAAoB,eAAe,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE;AAAA,MAE/E;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf,QAAQ;AAAA,YACR;AAAA,YACA;AAAA,YAEA;AAAA,2DAAC,wCAAuB,eAAa,+CAAoB,sBACtD;AAAA,uBACC,4CAAC,QAAK,IAEN;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAa,+CAAoB;AAAA,oBACjC;AAAA,oBACA;AAAA,oBACA,2BAA2B;AAAA,oBAE1B;AAAA;AAAA,gBACH;AAAA,gBAEF,4CAAC,6CAA4B;AAAA,iBAC/B;AAAA,cACC,CAAC,eAAe,4CAAC,2CAAc,GAAG,aAAa,IAAK;AAAA;AAAA;AAAA,QACvD;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 from 'react';\nimport { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSTooltipV3PropTypesSchema } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\nimport { useTooltipV3 } from './config/useTooltipV3.js';\nimport { DSTooltipV3Name } from './constants.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { propsWithDefault } = useTooltipV3(props);\n\n const {\n text,\n startPlacementPreference,\n children,\n onOpen,\n onClose,\n id,\n textAlign,\n wrapWords,\n withoutArrow,\n customOffset,\n animationDuration,\n withoutAnimation,\n withoutPortal,\n portalDOMContainer,\n applyTooltipOverflowWrap,\n showPopover,\n Text,\n textProps,\n } = propsWithDefault;\n\n const { handlers, arrowStyles, floatingStyles, isOpen, refs, context } = useFloatingContext({\n placement: startPlacementPreference,\n customOffset,\n onOpen,\n onClose,\n withoutPortal,\n withoutAnimation,\n portalDOMContainer,\n animationDuration,\n externallyControlledIsOpen: showPopover,\n });\n\n const isOpenSourceOfTruth = React.useMemo(() => {\n if (showPopover !== undefined) return showPopover;\n return isOpen;\n }, [showPopover, isOpen]);\n\n return (\n <StyledTriggerWrapper\n {...handlers}\n innerRef={refs.setReference}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isOpenSourceOfTruth}\n floatingStyles={floatingStyles}\n context={context}\n >\n <StyledTooltipContainer data-testid={TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}>\n {Text ? (\n <Text {...(textProps ?? {})} />\n ) : (\n <StyledTooltipText\n data-testid={TooltipV3DatatestId.OPINIONATED_TEXT_WRAPPER}\n textAlign={textAlign}\n wrapWords={wrapWords}\n $applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n {text}\n </StyledTooltipText>\n )}\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n {!withoutArrow ? <PopoverArrow {...arrowStyles} /> : null}\n </FloatingWrapper>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = DSTooltipV3Name;\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = DSTooltipV3PropTypesSchema;\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;ADqEf;AApER,mBAAkB;AAClB,iCAAkE;AAClE,8BAAyB;AACzB,mCAA2C;AAC3C,iCAAoC;AACpC,oBAKO;AAEP,0BAA6B;AAC7B,uBAAgC;AAEhC,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,iBAAiB,QAAI,kCAAa,KAAK;AAE/C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,UAAU,aAAa,gBAAgB,QAAQ,MAAM,QAAQ,QAAI,+CAAmB;AAAA,IAC1F,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,4BAA4B;AAAA,EAC9B,CAAC;AAED,QAAM,sBAAsB,aAAAA,QAAM,QAAQ,MAAM;AAC9C,QAAI,gBAAgB,OAAW,QAAO;AACtC,WAAO;AAAA,EACT,GAAG,CAAC,aAAa,MAAM,CAAC;AAExB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,KAAK;AAAA,MACf,eAAa,GAAG,+CAAoB,eAAe,GAAG,OAAO,KAAK,IAAI,EAAE,KAAK,EAAE;AAAA,MAE/E;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,KAAK;AAAA,YACf,QAAQ;AAAA,YACR;AAAA,YACA;AAAA,YAEA;AAAA,2DAAC,wCAAuB,eAAa,+CAAoB,sBACtD;AAAA,uBACC,4CAAC,QAAM,GAAI,aAAa,CAAC,GAAI,IAE7B;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAa,+CAAoB;AAAA,oBACjC;AAAA,oBACA;AAAA,oBACA,2BAA2B;AAAA,oBAE1B;AAAA;AAAA,gBACH;AAAA,gBAEF,4CAAC,6CAA4B;AAAA,iBAC/B;AAAA,cACC,CAAC,eAAe,4CAAC,2CAAc,GAAG,aAAa,IAAK;AAAA;AAAA;AAAA,QACvD;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
  }
@@ -40,7 +40,7 @@ var import_defaultProps = require("../defaultProps.js");
40
40
  var import_useValidateProps = require("./useValidateProps.js");
41
41
  const useTooltipV3 = (propsFromUser) => {
42
42
  const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_defaultProps.defaultProps);
43
- (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.propTypes);
43
+ (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSTooltipV3PropTypes);
44
44
  const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
45
45
  const instanceUid = import_react.default.useMemo(() => `ds-tooltip-v3-${(0, import_uid.uid)(5)}`, []);
46
46
  return import_react.default.useMemo(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useTooltipV3.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSTooltipV3T, propTypes } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../defaultProps.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface Tooltipv3CTX {\n propsWithDefault: DSTooltipV3T.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useTooltipV3 = (propsFromUser: DSTooltipV3T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, propTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-tooltip-v3-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAiE;AACjE,iBAAoB;AACpB,mCAA6C;AAC7C,0BAA6B;AAC7B,8BAAiC;AAQ1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,uBAAmB,sDAAyD,eAAe,gCAAY;AAC7G,gDAAiB,kBAAkB,sCAAS;AAI5C,QAAM,mBAAe,4CAAmB,gBAAgB;AAKxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,qBAAiB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSTooltipV3T, DSTooltipV3PropTypes } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../defaultProps.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface Tooltipv3CTX {\n propsWithDefault: DSTooltipV3T.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useTooltipV3 = (propsFromUser: DSTooltipV3T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSTooltipV3PropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-tooltip-v3-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAiE;AACjE,iBAAoB;AACpB,mCAAwD;AACxD,0BAA6B;AAC7B,8BAAiC;AAQ1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,uBAAmB,sDAAyD,eAAe,gCAAY;AAC7G,gDAAiB,kBAAkB,iDAAoB;AAIvD,QAAM,mBAAe,4CAAmB,gBAAgB;AAKxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,qBAAiB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -28,13 +28,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var react_desc_prop_types_exports = {};
30
30
  __export(react_desc_prop_types_exports, {
31
- propTypes: () => propTypes
31
+ DSTooltipV3PropTypes: () => DSTooltipV3PropTypes,
32
+ DSTooltipV3PropTypesSchema: () => DSTooltipV3PropTypesSchema
32
33
  });
33
34
  module.exports = __toCommonJS(react_desc_prop_types_exports);
34
35
  var React = __toESM(require("react"));
35
36
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
37
  var import_constants = require("./constants.js");
37
- const propTypes = {
38
+ const DSTooltipV3PropTypes = {
38
39
  text: import_ds_props_helpers.PropTypes.string.description(
39
40
  "Tooltip text to be displayed on hover/focus. If both `text` and `Text` are provided, only `Text` will take precedence."
40
41
  ).isRequiredIf((props) => !props.Text),
@@ -63,6 +64,10 @@ const propTypes = {
63
64
  showPopover: import_ds_props_helpers.PropTypes.bool.description("Whether or not the tooltip should be always shown"),
64
65
  Text: import_ds_props_helpers.PropTypes.func.description(
65
66
  "Custom component (HTML/JSX) to be displayed in the tooltip. If both `text` and `Text` are provided, only `Text` will take precedence."
66
- ).isRequiredIf((props) => !props.text)
67
+ ).isRequiredIf((props) => !props.text),
68
+ textProps: import_ds_props_helpers.PropTypes.object.description(
69
+ "Props to be passed to the custom Text component, if provided, used mainly to avoiding inline components definition to improve performance"
70
+ )
67
71
  };
72
+ const DSTooltipV3PropTypesSchema = DSTooltipV3PropTypes;
68
73
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/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 startPlacementPreference: Placement;\n applyTooltipOverflowWrap: boolean;\n customOffset?: [number, number];\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 placementOrderPreference?: Placement[];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n Text?: React.ComponentType;\n text?: string;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\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\n .description(\n 'Tooltip text to be displayed on hover/focus. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.Text),\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 showPopover: PropTypes.bool.description('Whether or not the tooltip should be always shown'),\n Text: PropTypes.func\n .description(\n 'Custom component (HTML/JSX) to be displayed in the tooltip. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.text),\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;AA+DnC,MAAM,YAAY;AAAA,EACvB,MAAM,kCAAU,OACb;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,UAAmC,CAAC,MAAM,IAAI;AAAA,EAC/D,WAAW,kCAAU,MAAM,+BAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,0BAA0B,kCAAU,KACjC;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,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;AAAA,EAC1B,aAAa,kCAAU,KAAK,YAAY,mDAAmD;AAAA,EAC3F,MAAM,kCAAU,KACb;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,UAAmC,CAAC,MAAM,IAAI;AACjE;",
4
+ "sourcesContent": ["import type { DSPropTypesSchema, ValidationMap } 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 startPlacementPreference: Placement;\n applyTooltipOverflowWrap: boolean;\n customOffset?: [number, number];\n }\n\n export interface OptionalProps {\n zIndex?: number;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuration?: number;\n portalDOMContainer?: HTMLElement;\n placementOrderPreference?: Placement[];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n Text?: React.ComponentType<Record<string, unknown>>;\n textProps?: Record<string, unknown>;\n text?: string;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\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 DSTooltipV3PropTypes: DSPropTypesSchema<DSTooltipV3T.Props> = {\n text: PropTypes.string\n .description(\n 'Tooltip text to be displayed on hover/focus. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.Text),\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 showPopover: PropTypes.bool.description('Whether or not the tooltip should be always shown'),\n Text: PropTypes.func\n .description(\n 'Custom component (HTML/JSX) to be displayed in the tooltip. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.text),\n textProps: PropTypes.object.description(\n 'Props to be passed to the custom Text component, if provided, used mainly to avoiding inline components definition to improve performance',\n ),\n};\n\nexport const DSTooltipV3PropTypesSchema = DSTooltipV3PropTypes as unknown as ValidationMap<DSTooltipV3T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAC1B,uBAA0C;AA+DnC,MAAM,uBAA8D;AAAA,EACzE,MAAM,kCAAU,OACb;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,UAAmC,CAAC,MAAM,IAAI;AAAA,EAC/D,WAAW,kCAAU,MAAM,+BAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,0BAA0B,kCAAU,KACjC;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,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;AAAA,EAC1B,aAAa,kCAAU,KAAK,YAAY,mDAAmD;AAAA,EAC3F,MAAM,kCAAU,KACb;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,UAAmC,CAAC,MAAM,IAAI;AAAA,EAC/D,WAAW,kCAAU,OAAO;AAAA,IAC1B;AAAA,EACF;AACF;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -28,9 +28,17 @@ const mockPlacementOrderPreference = ["bottom-start", "bottom", "bottom-end"];
28
28
  const mockCustomOffset = [0, 0];
29
29
  const mockModifiers = [{}];
30
30
  const testRequiredProps = {};
31
+ const TextComponentThatReceivesProps = (props) => {
32
+ const { title, description } = props;
33
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
34
+ title,
35
+ " - ",
36
+ description
37
+ ] });
38
+ };
39
+ const FixedTextComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: " hello world! " });
31
40
  const testOptionalProps = {
32
41
  zIndex: 1,
33
- ariaLabel: "",
34
42
  withoutPortal: false,
35
43
  withoutArrow: false,
36
44
  withoutAnimation: false,
@@ -40,7 +48,11 @@ const testOptionalProps = {
40
48
  placementOrderPreference: mockPlacementOrderPreference,
41
49
  modifiers: mockModifiers,
42
50
  showPopover: true,
43
- Text: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Custom Tooltip" })
51
+ Text: TextComponentThatReceivesProps,
52
+ textProps: {
53
+ title: "Custom Tooltip Title",
54
+ description: "Custom Tooltip Description"
55
+ }
44
56
  };
45
57
  const testPartialDefaults = {
46
58
  id: "",
@@ -92,7 +104,6 @@ const testExplicitDefinition = {
92
104
  applyTooltipOverflowWrap: false,
93
105
  text: "",
94
106
  zIndex: 1,
95
- ariaLabel: "",
96
107
  withoutPortal: false,
97
108
  withoutArrow: false,
98
109
  withoutAnimation: false,
@@ -108,11 +119,11 @@ const testExplicitDefinition = {
108
119
  const testExplicitDefinitionWithBoth = {
109
120
  ...testExplicitDefinition,
110
121
  text: "String does not takes precedence",
111
- Text: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Should show (Text takes precedence)" })
122
+ Text: FixedTextComponent
112
123
  };
113
124
  const testExplicitDefinitionWithOnlyTextComponent = {
114
125
  ...testExplicitDefinition,
115
- Text: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Plain string as ReactNode" })
126
+ Text: FixedTextComponent
116
127
  };
117
128
  const testExplicitDefinitionWithOnlyTextString = {
118
129
  ...testExplicitDefinition,
@@ -129,7 +140,6 @@ const testInferedTypeCompatibility = {
129
140
  applyTooltipOverflowWrap: false,
130
141
  text: "",
131
142
  zIndex: 1,
132
- ariaLabel: "",
133
143
  withoutPortal: false,
134
144
  withoutArrow: false,
135
145
  withoutAnimation: false,
@@ -152,7 +162,6 @@ const testDefinitionAsConst = {
152
162
  wrapWords: false,
153
163
  text: "",
154
164
  zIndex: 1,
155
- ariaLabel: "",
156
165
  withoutPortal: false,
157
166
  withoutArrow: false,
158
167
  withoutAnimation: false,
@@ -181,7 +190,6 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
181
190
  wrapWords: false,
182
191
  text: "",
183
192
  zIndex: 1,
184
- ariaLabel: "",
185
193
  withoutPortal: false,
186
194
  withoutArrow: false,
187
195
  withoutAnimation: false,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-tooltip-v3-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\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.DefaultProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\nconst testRequiredProps: Omit<ComponentPropsRequiredProps, 'children'> = {};\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 placementOrderPreference: mockPlacementOrderPreference,\n modifiers: mockModifiers,\n showPopover: true,\n Text: () => <span>Custom Tooltip</span>,\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 startPlacementPreference: 'bottom',\n applyTooltipOverflowWrap: false,\n customOffset: mockCustomOffset,\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\nconst testExplicitDefinitionWithBoth: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String does not takes precedence',\n Text: () => <span>Should show (Text takes precedence)</span>,\n};\n\nconst testExplicitDefinitionWithOnlyTextComponent: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n Text: () => <span>Plain string as ReactNode</span>,\n};\nconst testExplicitDefinitionWithOnlyTextString: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String Tooltip',\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 >\n <div />\n </DSTooltipV3>\n\n {/* with both text and Text, Text takes precedence */}\n <DSTooltipV3 {...testExplicitDefinitionWithBoth}>\n <div>Hover me (Text Component takes precedence)</div>\n </DSTooltipV3>\n\n {/* with only Text Component */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextComponent}>\n <div>Hover me (only Text Component)</div>\n </DSTooltipV3>\n\n {/* with only Text String */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextString}>\n <div>Hover me (only text string)</div>\n </DSTooltipV3>\n </>\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;AC8BT;AA5Bd,eAA4B;AAU5B,MAAM,+BAAyD,CAAC,gBAAgB,UAAU,YAAY;AACtG,MAAM,mBAA8D,CAAC,GAAG,CAAC;AACzE,MAAM,gBAAyD,CAAC,CAAC,CAAC;AAElE,MAAM,oBAAmE,CAAC;AAE1E,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,WAAW;AAAA,EACX,aAAa;AAAA,EACb,MAAM,MAAM,4CAAC,UAAK,4BAAc;AAClC;AAIA,MAAM,sBAA2D;AAAA,EAC/D,IAAI;AAAA,EACJ,QAAQ,MAAM;AAAA,EAAC;AAAA,EACf,SAAS,MAAM;AAAA,EAAC;AAClB;AAGA,MAAM,YAAo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f,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,MAEX,sDAAC,SAAI;AAAA;AAAA,EACP;AAAA,EAGA,4CAAC,wBAAa,GAAG,gCACf,sDAAC,SAAI,wDAA0C,GACjD;AAAA,EAGA,4CAAC,wBAAa,GAAG,6CACf,sDAAC,SAAI,4CAA8B,GACrC;AAAA,EAGA,4CAAC,wBAAa,GAAG,0CACf,sDAAC,SAAI,yCAA2B,GAClC;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\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.DefaultProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\nconst testRequiredProps: Omit<ComponentPropsRequiredProps, 'children'> = {};\n\nconst TextComponentThatReceivesProps: Required<DSTooltipV3T.Props>['Text'] = (props) => {\n const { title, description } = props as unknown as {\n title: string;\n description: string;\n };\n return (\n <span>\n {title} - {description}\n </span>\n );\n};\nconst FixedTextComponent: Required<DSTooltipV3T.Props>['Text'] = (props) => <span> hello world! </span>;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n zIndex: 1,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n placementOrderPreference: mockPlacementOrderPreference,\n modifiers: mockModifiers,\n showPopover: true,\n Text: TextComponentThatReceivesProps,\n textProps: {\n title: 'Custom Tooltip Title',\n description: 'Custom Tooltip Description',\n },\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 startPlacementPreference: 'bottom',\n applyTooltipOverflowWrap: false,\n customOffset: mockCustomOffset,\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 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\nconst testExplicitDefinitionWithBoth: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String does not takes precedence',\n Text: FixedTextComponent,\n};\n\nconst testExplicitDefinitionWithOnlyTextComponent: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n Text: FixedTextComponent,\n};\nconst testExplicitDefinitionWithOnlyTextString: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String Tooltip',\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 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 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 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 >\n <div />\n </DSTooltipV3>\n\n {/* with both text and Text, Text takes precedence */}\n <DSTooltipV3 {...testExplicitDefinitionWithBoth}>\n <div>Hover me (Text Component takes precedence)</div>\n </DSTooltipV3>\n\n {/* with only Text Component */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextComponent}>\n <div>Hover me (only Text Component)</div>\n </DSTooltipV3>\n\n {/* with only Text String */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextString}>\n <div>Hover me (only text string)</div>\n </DSTooltipV3>\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACwBnB;AAtBJ,eAA4B;AAU5B,MAAM,+BAAyD,CAAC,gBAAgB,UAAU,YAAY;AACtG,MAAM,mBAA8D,CAAC,GAAG,CAAC;AACzE,MAAM,gBAAyD,CAAC,CAAC,CAAC;AAElE,MAAM,oBAAmE,CAAC;AAE1E,MAAM,iCAAuE,CAAC,UAAU;AACtF,QAAM,EAAE,OAAO,YAAY,IAAI;AAI/B,SACE,6CAAC,UACE;AAAA;AAAA,IAAM;AAAA,IAAI;AAAA,KACb;AAEJ;AACA,MAAM,qBAA2D,CAAC,UAAU,4CAAC,UAAK,4BAAc;AAEhG,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AG,8BACf,sDAAC,SAAI,GACP;AAAA,EACA,4CAAC,wBAAa,GAAG,uBACf,sDAAC,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,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,MAEX,sDAAC,SAAI;AAAA;AAAA,EACP;AAAA,EAGA,4CAAC,wBAAa,GAAG,gCACf,sDAAC,SAAI,wDAA0C,GACjD;AAAA,EAGA,4CAAC,wBAAa,GAAG,6CACf,sDAAC,SAAI,4CAA8B,GACrC;AAAA,EAGA,4CAAC,wBAAa,GAAG,0CACf,sDAAC,SAAI,yCAA2B,GAClC;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
4
  import { useFloatingContext, PopoverArrow, FloatingWrapper } from "@elliemae/ds-floating-context";
5
5
  import { describe } from "@elliemae/ds-props-helpers";
6
- import { propTypes } from "./react-desc-prop-types.js";
6
+ import { DSTooltipV3PropTypesSchema } from "./react-desc-prop-types.js";
7
7
  import { TooltipV3DatatestId } from "./TooltipV3DatatestId.js";
8
8
  import {
9
9
  StyledTooltipContainer,
@@ -32,7 +32,8 @@ const DSTooltipV3 = (props) => {
32
32
  portalDOMContainer,
33
33
  applyTooltipOverflowWrap,
34
34
  showPopover,
35
- Text
35
+ Text,
36
+ textProps
36
37
  } = propsWithDefault;
37
38
  const { handlers, arrowStyles, floatingStyles, isOpen, refs, context } = useFloatingContext({
38
39
  placement: startPlacementPreference,
@@ -65,7 +66,7 @@ const DSTooltipV3 = (props) => {
65
66
  context,
66
67
  children: [
67
68
  /* @__PURE__ */ jsxs(StyledTooltipContainer, { "data-testid": TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER, children: [
68
- Text ? /* @__PURE__ */ jsx(Text, {}) : /* @__PURE__ */ jsx(
69
+ Text ? /* @__PURE__ */ jsx(Text, { ...textProps ?? {} }) : /* @__PURE__ */ jsx(
69
70
  StyledTooltipText,
70
71
  {
71
72
  "data-testid": TooltipV3DatatestId.OPINIONATED_TEXT_WRAPPER,
@@ -88,7 +89,7 @@ const DSTooltipV3 = (props) => {
88
89
  };
89
90
  DSTooltipV3.displayName = DSTooltipV3Name;
90
91
  const DSTooltipV3WithSchema = describe(DSTooltipV3);
91
- DSTooltipV3WithSchema.propTypes = propTypes;
92
+ DSTooltipV3WithSchema.propTypes = DSTooltipV3PropTypesSchema;
92
93
  var DSTooltipV3_default = DSTooltipV3;
93
94
  export {
94
95
  DSTooltipV3,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSTooltipV3.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\nimport { useTooltipV3 } from './config/useTooltipV3.js';\nimport { DSTooltipV3Name } from './constants.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { propsWithDefault } = useTooltipV3(props);\n\n const {\n text,\n startPlacementPreference,\n children,\n onOpen,\n onClose,\n id,\n textAlign,\n wrapWords,\n withoutArrow,\n customOffset,\n animationDuration,\n withoutAnimation,\n withoutPortal,\n portalDOMContainer,\n applyTooltipOverflowWrap,\n showPopover,\n Text,\n } = propsWithDefault;\n\n const { handlers, arrowStyles, floatingStyles, isOpen, refs, context } = useFloatingContext({\n placement: startPlacementPreference,\n customOffset,\n onOpen,\n onClose,\n withoutPortal,\n withoutAnimation,\n portalDOMContainer,\n animationDuration,\n externallyControlledIsOpen: showPopover,\n });\n\n const isOpenSourceOfTruth = React.useMemo(() => {\n if (showPopover !== undefined) return showPopover;\n return isOpen;\n }, [showPopover, isOpen]);\n\n return (\n <StyledTriggerWrapper\n {...handlers}\n innerRef={refs.setReference}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isOpenSourceOfTruth}\n floatingStyles={floatingStyles}\n context={context}\n >\n <StyledTooltipContainer data-testid={TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}>\n {Text ? (\n <Text />\n ) : (\n <StyledTooltipText\n data-testid={TooltipV3DatatestId.OPINIONATED_TEXT_WRAPPER}\n textAlign={textAlign}\n wrapWords={wrapWords}\n $applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n {text}\n </StyledTooltipText>\n )}\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n {!withoutArrow ? <PopoverArrow {...arrowStyles} /> : null}\n </FloatingWrapper>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = DSTooltipV3Name;\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = propTypes;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\n\nexport default DST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QAAK,IAEN;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAa,oBAAoB;AAAA,oBACjC;AAAA,oBACA;AAAA,oBACA,2BAA2B;AAAA,oBAE1B;AAAA;AAAA,gBACH;AAAA,gBAEF,oBAAC,+BAA4B;AAAA,iBAC/B;AAAA,cACC,CAAC,eAAe,oBAAC,gBAAc,GAAG,aAAa,IAAK;AAAA;AAAA;AAAA,QACvD;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 from 'react';\nimport { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSTooltipV3PropTypesSchema } from './react-desc-prop-types.js';\nimport { TooltipV3DatatestId } from './TooltipV3DatatestId.js';\nimport {\n StyledTooltipContainer,\n StyledTooltipText,\n StyledMouseOverDetectionBox,\n StyledTriggerWrapper,\n} from './styles.js';\nimport type { DSTooltipV3T } from './react-desc-prop-types.js';\nimport { useTooltipV3 } from './config/useTooltipV3.js';\nimport { DSTooltipV3Name } from './constants.js';\n\nconst DSTooltipV3: React.ComponentType<DSTooltipV3T.Props> = (props) => {\n const { propsWithDefault } = useTooltipV3(props);\n\n const {\n text,\n startPlacementPreference,\n children,\n onOpen,\n onClose,\n id,\n textAlign,\n wrapWords,\n withoutArrow,\n customOffset,\n animationDuration,\n withoutAnimation,\n withoutPortal,\n portalDOMContainer,\n applyTooltipOverflowWrap,\n showPopover,\n Text,\n textProps,\n } = propsWithDefault;\n\n const { handlers, arrowStyles, floatingStyles, isOpen, refs, context } = useFloatingContext({\n placement: startPlacementPreference,\n customOffset,\n onOpen,\n onClose,\n withoutPortal,\n withoutAnimation,\n portalDOMContainer,\n animationDuration,\n externallyControlledIsOpen: showPopover,\n });\n\n const isOpenSourceOfTruth = React.useMemo(() => {\n if (showPopover !== undefined) return showPopover;\n return isOpen;\n }, [showPopover, isOpen]);\n\n return (\n <StyledTriggerWrapper\n {...handlers}\n innerRef={refs.setReference}\n data-testid={`${TooltipV3DatatestId.TRIGGER_WRAPPER}${id !== '' ? `_${id}` : ''}`}\n >\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={isOpenSourceOfTruth}\n floatingStyles={floatingStyles}\n context={context}\n >\n <StyledTooltipContainer data-testid={TooltipV3DatatestId.TOOLTIP_TEXT_WRAPPER}>\n {Text ? (\n <Text {...(textProps ?? {})} />\n ) : (\n <StyledTooltipText\n data-testid={TooltipV3DatatestId.OPINIONATED_TEXT_WRAPPER}\n textAlign={textAlign}\n wrapWords={wrapWords}\n $applyTooltipOverflowWrap={applyTooltipOverflowWrap}\n >\n {text}\n </StyledTooltipText>\n )}\n <StyledMouseOverDetectionBox />\n </StyledTooltipContainer>\n {!withoutArrow ? <PopoverArrow {...arrowStyles} /> : null}\n </FloatingWrapper>\n\n {children}\n </StyledTriggerWrapper>\n );\n};\n\nDSTooltipV3.displayName = DSTooltipV3Name;\nconst DSTooltipV3WithSchema = describe(DSTooltipV3);\nDSTooltipV3WithSchema.propTypes = DSTooltipV3PropTypesSchema;\n\nexport { DSTooltipV3, DSTooltipV3WithSchema };\n\nexport default DSTooltipV3;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACqEf,SAEI,KAFJ;AApER,OAAOA,YAAW;AAClB,SAAS,oBAAoB,cAAc,uBAAuB;AAClE,SAAS,gBAAgB;AACzB,SAAS,kCAAkC;AAC3C,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEhC,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,iBAAiB,IAAI,aAAa,KAAK;AAE/C,QAAM;AAA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,SAAS,WAAW;AAClD,sBAAsB,YAAY;AAIlC,IAAO,sBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -2,12 +2,12 @@ import * as React from "react";
2
2
  import React2 from "react";
3
3
  import { useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
4
4
  import { uid } from "uid";
5
- import { propTypes } from "../react-desc-prop-types.js";
5
+ import { DSTooltipV3PropTypes } from "../react-desc-prop-types.js";
6
6
  import { defaultProps } from "../defaultProps.js";
7
7
  import { useValidateProps } from "./useValidateProps.js";
8
8
  const useTooltipV3 = (propsFromUser) => {
9
9
  const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
10
- useValidateProps(propsWithDefault, propTypes);
10
+ useValidateProps(propsWithDefault, DSTooltipV3PropTypes);
11
11
  const xstyledProps = useGetXstyledProps(propsWithDefault);
12
12
  const instanceUid = React2.useMemo(() => `ds-tooltip-v3-${uid(5)}`, []);
13
13
  return React2.useMemo(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useTooltipV3.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSTooltipV3T, propTypes } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../defaultProps.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface Tooltipv3CTX {\n propsWithDefault: DSTooltipV3T.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useTooltipV3 = (propsFromUser: DSTooltipV3T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, propTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-tooltip-v3-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,WAAW;AACpB,SAA4B,iBAAiB;AAC7C,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAQ1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,mBAAmB,6BAAyD,eAAe,YAAY;AAC7G,mBAAiB,kBAAkB,SAAS;AAI5C,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,cAAcA,OAAM,QAAQ,MAAM,iBAAiB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSTooltipV3T, DSTooltipV3PropTypes } from '../react-desc-prop-types.js';\nimport { defaultProps } from '../defaultProps.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface Tooltipv3CTX {\n propsWithDefault: DSTooltipV3T.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useTooltipV3 = (propsFromUser: DSTooltipV3T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSTooltipV3T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSTooltipV3PropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-tooltip-v3-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,WAAW;AACpB,SAA4B,4BAA4B;AACxD,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAQ1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,mBAAmB,6BAAyD,eAAe,YAAY;AAC7G,mBAAiB,kBAAkB,oBAAoB;AAIvD,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,cAAcA,OAAM,QAAQ,MAAM,iBAAiB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { PropTypes } from "@elliemae/ds-props-helpers";
3
3
  import { PLACEMENT, TEXT_ALIGNMENT } from "./constants.js";
4
- const propTypes = {
4
+ const DSTooltipV3PropTypes = {
5
5
  text: PropTypes.string.description(
6
6
  "Tooltip text to be displayed on hover/focus. If both `text` and `Text` are provided, only `Text` will take precedence."
7
7
  ).isRequiredIf((props) => !props.Text),
@@ -30,9 +30,14 @@ const propTypes = {
30
30
  showPopover: PropTypes.bool.description("Whether or not the tooltip should be always shown"),
31
31
  Text: PropTypes.func.description(
32
32
  "Custom component (HTML/JSX) to be displayed in the tooltip. If both `text` and `Text` are provided, only `Text` will take precedence."
33
- ).isRequiredIf((props) => !props.text)
33
+ ).isRequiredIf((props) => !props.text),
34
+ textProps: PropTypes.object.description(
35
+ "Props to be passed to the custom Text component, if provided, used mainly to avoiding inline components definition to improve performance"
36
+ )
34
37
  };
38
+ const DSTooltipV3PropTypesSchema = DSTooltipV3PropTypes;
35
39
  export {
36
- propTypes
40
+ DSTooltipV3PropTypes,
41
+ DSTooltipV3PropTypesSchema
37
42
  };
38
43
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/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 startPlacementPreference: Placement;\n applyTooltipOverflowWrap: boolean;\n customOffset?: [number, number];\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 placementOrderPreference?: Placement[];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n Text?: React.ComponentType;\n text?: string;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\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\n .description(\n 'Tooltip text to be displayed on hover/focus. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.Text),\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 showPopover: PropTypes.bool.description('Whether or not the tooltip should be always shown'),\n Text: PropTypes.func\n .description(\n 'Custom component (HTML/JSX) to be displayed in the tooltip. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.text),\n} as WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAi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AU,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;AAAA,EAC1B,aAAa,UAAU,KAAK,YAAY,mDAAmD;AAAA,EAC3F,MAAM,UAAU,KACb;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,UAAmC,CAAC,MAAM,IAAI;AACjE;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { DSPropTypesSchema, ValidationMap } 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 startPlacementPreference: Placement;\n applyTooltipOverflowWrap: boolean;\n customOffset?: [number, number];\n }\n\n export interface OptionalProps {\n zIndex?: number;\n withoutPortal?: boolean;\n withoutArrow?: boolean;\n withoutAnimation?: boolean;\n boundaryElement?: HTMLElement;\n animationDuration?: number;\n portalDOMContainer?: HTMLElement;\n placementOrderPreference?: Placement[];\n modifiers?: Record<string, unknown>[];\n showPopover?: boolean;\n Text?: React.ComponentType<Record<string, unknown>>;\n textProps?: Record<string, unknown>;\n text?: string;\n }\n\n export interface RequiredProps {\n children: React.ReactNode;\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 DSTooltipV3PropTypes: DSPropTypesSchema<DSTooltipV3T.Props> = {\n text: PropTypes.string\n .description(\n 'Tooltip text to be displayed on hover/focus. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.Text),\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 showPopover: PropTypes.bool.description('Whether or not the tooltip should be always shown'),\n Text: PropTypes.func\n .description(\n 'Custom component (HTML/JSX) to be displayed in the tooltip. If both `text` and `Text` are provided, only `Text` will take precedence.',\n )\n .isRequiredIf((props: Record<string, unknown>) => !props.text),\n textProps: PropTypes.object.description(\n 'Props to be passed to the custom Text component, if provided, used mainly to avoiding inline components definition to improve performance',\n ),\n};\n\nexport const DSTooltipV3PropTypesSchema = DSTooltipV3PropTypes as unknown as ValidationMap<DSTooltipV3T.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,iBAAiB;AAC1B,SAAS,WAAW,sBAAsB;AA+DnC,MAAM,uBAA8D;AAAA,EACzE,MAAM,UAAU,OACb;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,UAAmC,CAAC,MAAM,IAAI;AAAA,EAC/D,WAAW,UAAU,MAAM,cAAsC,EAC9D,YAAY,wBAAwB,EACpC,aAAa,MAAM;AAAA,EACtB,0BAA0B,UAAU,KACjC;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,WAAW,UAAU,KAClB,YAAY,2EAA2E,EACvF,aAAa,KAAK;AAAA,EAC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M,IAAI;AAAA,EAC/D,WAAW,UAAU,OAAO;AAAA,IAC1B;AAAA,EACF;AACF;AAEO,MAAM,6BAA6B;",
6
6
  "names": []
7
7
  }
@@ -5,9 +5,17 @@ const mockPlacementOrderPreference = ["bottom-start", "bottom", "bottom-end"];
5
5
  const mockCustomOffset = [0, 0];
6
6
  const mockModifiers = [{}];
7
7
  const testRequiredProps = {};
8
+ const TextComponentThatReceivesProps = (props) => {
9
+ const { title, description } = props;
10
+ return /* @__PURE__ */ jsxs("span", { children: [
11
+ title,
12
+ " - ",
13
+ description
14
+ ] });
15
+ };
16
+ const FixedTextComponent = (props) => /* @__PURE__ */ jsx("span", { children: " hello world! " });
8
17
  const testOptionalProps = {
9
18
  zIndex: 1,
10
- ariaLabel: "",
11
19
  withoutPortal: false,
12
20
  withoutArrow: false,
13
21
  withoutAnimation: false,
@@ -17,7 +25,11 @@ const testOptionalProps = {
17
25
  placementOrderPreference: mockPlacementOrderPreference,
18
26
  modifiers: mockModifiers,
19
27
  showPopover: true,
20
- Text: () => /* @__PURE__ */ jsx("span", { children: "Custom Tooltip" })
28
+ Text: TextComponentThatReceivesProps,
29
+ textProps: {
30
+ title: "Custom Tooltip Title",
31
+ description: "Custom Tooltip Description"
32
+ }
21
33
  };
22
34
  const testPartialDefaults = {
23
35
  id: "",
@@ -69,7 +81,6 @@ const testExplicitDefinition = {
69
81
  applyTooltipOverflowWrap: false,
70
82
  text: "",
71
83
  zIndex: 1,
72
- ariaLabel: "",
73
84
  withoutPortal: false,
74
85
  withoutArrow: false,
75
86
  withoutAnimation: false,
@@ -85,11 +96,11 @@ const testExplicitDefinition = {
85
96
  const testExplicitDefinitionWithBoth = {
86
97
  ...testExplicitDefinition,
87
98
  text: "String does not takes precedence",
88
- Text: () => /* @__PURE__ */ jsx("span", { children: "Should show (Text takes precedence)" })
99
+ Text: FixedTextComponent
89
100
  };
90
101
  const testExplicitDefinitionWithOnlyTextComponent = {
91
102
  ...testExplicitDefinition,
92
- Text: () => /* @__PURE__ */ jsx("span", { children: "Plain string as ReactNode" })
103
+ Text: FixedTextComponent
93
104
  };
94
105
  const testExplicitDefinitionWithOnlyTextString = {
95
106
  ...testExplicitDefinition,
@@ -106,7 +117,6 @@ const testInferedTypeCompatibility = {
106
117
  applyTooltipOverflowWrap: false,
107
118
  text: "",
108
119
  zIndex: 1,
109
- ariaLabel: "",
110
120
  withoutPortal: false,
111
121
  withoutArrow: false,
112
122
  withoutAnimation: false,
@@ -129,7 +139,6 @@ const testDefinitionAsConst = {
129
139
  wrapWords: false,
130
140
  text: "",
131
141
  zIndex: 1,
132
- ariaLabel: "",
133
142
  withoutPortal: false,
134
143
  withoutArrow: false,
135
144
  withoutAnimation: false,
@@ -158,7 +167,6 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
158
167
  wrapWords: false,
159
168
  text: "",
160
169
  zIndex: 1,
161
- ariaLabel: "",
162
170
  withoutPortal: false,
163
171
  withoutArrow: false,
164
172
  withoutAnimation: false,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-tooltip-v3-valid.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\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.DefaultProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\nconst testRequiredProps: Omit<ComponentPropsRequiredProps, 'children'> = {};\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 placementOrderPreference: mockPlacementOrderPreference,\n modifiers: mockModifiers,\n showPopover: true,\n Text: () => <span>Custom Tooltip</span>,\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 startPlacementPreference: 'bottom',\n applyTooltipOverflowWrap: false,\n customOffset: mockCustomOffset,\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\nconst testExplicitDefinitionWithBoth: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String does not takes precedence',\n Text: () => <span>Should show (Text takes precedence)</span>,\n};\n\nconst testExplicitDefinitionWithOnlyTextComponent: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n Text: () => <span>Plain string as ReactNode</span>,\n};\nconst testExplicitDefinitionWithOnlyTextString: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String Tooltip',\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 >\n <div />\n </DSTooltipV3>\n\n {/* with both text and Text, Text takes precedence */}\n <DSTooltipV3 {...testExplicitDefinitionWithBoth}>\n <div>Hover me (Text Component takes precedence)</div>\n </DSTooltipV3>\n\n {/* with only Text Component */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextComponent}>\n <div>Hover me (only Text Component)</div>\n </DSTooltipV3>\n\n {/* with only Text String */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextString}>\n <div>Hover me (only text string)</div>\n </DSTooltipV3>\n </>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC8BT,SAuIZ,UAvIY,KAuIZ,YAvIY;AA5Bd,SAAS,mBAAmB;AAU5B,MAAM,+BAAyD,CAAC,gBAAgB,UAAU,YAAY;AACtG,MAAM,mBAA8D,CAAC,GAAG,CAAC;AACzE,MAAM,gBAAyD,CAAC,CAAC,CAAC;AAElE,MAAM,oBAAmE,CAAC;AAE1E,MAAM,oBAAiD;AAAA,EACrD,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,eAAe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AA,EACA,oBAAC,eAAa,GAAG,8BACf,8BAAC,SAAI,GACP;AAAA,EACA,oBAAC,eAAa,GAAG,uBACf,8BAAC,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,MAEX,8BAAC,SAAI;AAAA;AAAA,EACP;AAAA,EAGA,oBAAC,eAAa,GAAG,gCACf,8BAAC,SAAI,wDAA0C,GACjD;AAAA,EAGA,oBAAC,eAAa,GAAG,6CACf,8BAAC,SAAI,4CAA8B,GACrC;AAAA,EAGA,oBAAC,eAAa,GAAG,0CACf,8BAAC,SAAI,yCAA2B,GAClC;AAAA,GACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\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.DefaultProps['customOffset'] = [0, 0];\nconst mockModifiers: DSTooltipV3T.OptionalProps['modifiers'] = [{}];\n\nconst testRequiredProps: Omit<ComponentPropsRequiredProps, 'children'> = {};\n\nconst TextComponentThatReceivesProps: Required<DSTooltipV3T.Props>['Text'] = (props) => {\n const { title, description } = props as unknown as {\n title: string;\n description: string;\n };\n return (\n <span>\n {title} - {description}\n </span>\n );\n};\nconst FixedTextComponent: Required<DSTooltipV3T.Props>['Text'] = (props) => <span> hello world! </span>;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n zIndex: 1,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n boundaryElement: undefined,\n animationDuration: 1000,\n portalDOMContainer: undefined,\n placementOrderPreference: mockPlacementOrderPreference,\n modifiers: mockModifiers,\n showPopover: true,\n Text: TextComponentThatReceivesProps,\n textProps: {\n title: 'Custom Tooltip Title',\n description: 'Custom Tooltip Description',\n },\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 startPlacementPreference: 'bottom',\n applyTooltipOverflowWrap: false,\n customOffset: mockCustomOffset,\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 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\nconst testExplicitDefinitionWithBoth: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String does not takes precedence',\n Text: FixedTextComponent,\n};\n\nconst testExplicitDefinitionWithOnlyTextComponent: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n Text: FixedTextComponent,\n};\nconst testExplicitDefinitionWithOnlyTextString: Omit<ComponentPropsForApp, 'children'> = {\n ...testExplicitDefinition,\n text: 'String Tooltip',\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 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 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 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 >\n <div />\n </DSTooltipV3>\n\n {/* with both text and Text, Text takes precedence */}\n <DSTooltipV3 {...testExplicitDefinitionWithBoth}>\n <div>Hover me (Text Component takes precedence)</div>\n </DSTooltipV3>\n\n {/* with only Text Component */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextComponent}>\n <div>Hover me (only Text Component)</div>\n </DSTooltipV3>\n\n {/* with only Text String */}\n <DSTooltipV3 {...testExplicitDefinitionWithOnlyTextString}>\n <div>Hover me (only text string)</div>\n </DSTooltipV3>\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACwBnB,SA0JF,UArJ0E,KALxE;AAtBJ,SAAS,mBAAmB;AAU5B,MAAM,+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ACN,QAAQ;AAAA,EACR,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,wBACf,8BAAC,SAAI,GACP;AAAA,EACA,oBAAC,eAAa,GAAG,8BACf,8BAAC,SAAI,GACP;AAAA,EACA,oBAAC,eAAa,GAAG,uBACf,8BAAC,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,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,MAEX,8BAAC,SAAI;AAAA;AAAA,EACP;AAAA,EAGA,oBAAC,eAAa,GAAG,gCACf,8BAAC,SAAI,wDAA0C,GACjD;AAAA,EAGA,oBAAC,eAAa,GAAG,6CACf,8BAAC,SAAI,4CAA8B,GACrC;AAAA,EAGA,oBAAC,eAAa,GAAG,0CACf,8BAAC,SAAI,yCAA2B,GAClC;AAAA,GACF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
- import type { WeakValidationMap } from 'react';
2
- import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';
1
+ /// <reference types="react" />
2
+ /// <reference types="prop-types" />
3
+ import type { DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';
3
4
  export declare namespace DSTooltipV3T {
4
5
  type Placement = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
5
6
  type TextAlignment = 'left' | 'right' | 'center' | 'justify' | 'initial' | 'inherit';
@@ -15,7 +16,6 @@ export declare namespace DSTooltipV3T {
15
16
  }
16
17
  interface OptionalProps {
17
18
  zIndex?: number;
18
- ariaLabel?: string;
19
19
  withoutPortal?: boolean;
20
20
  withoutArrow?: boolean;
21
21
  withoutAnimation?: boolean;
@@ -25,15 +25,17 @@ export declare namespace DSTooltipV3T {
25
25
  placementOrderPreference?: Placement[];
26
26
  modifiers?: Record<string, unknown>[];
27
27
  showPopover?: boolean;
28
- Text?: React.ComponentType;
28
+ Text?: React.ComponentType<Record<string, unknown>>;
29
+ textProps?: Record<string, unknown>;
29
30
  text?: string;
30
31
  }
31
32
  interface RequiredProps {
32
33
  children: React.ReactNode;
33
34
  }
34
- interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, RequiredProps {
35
+ interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {
35
36
  }
36
- interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps>, RequiredProps {
37
+ interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {
37
38
  }
38
39
  }
39
- export declare const propTypes: WeakValidationMap<unknown>;
40
+ export declare const DSTooltipV3PropTypes: DSPropTypesSchema<DSTooltipV3T.Props>;
41
+ export declare const DSTooltipV3PropTypesSchema: ValidationMap<DSTooltipV3T.Props>;
@@ -0,0 +1 @@
1
+ export const CustomTextTooltipTestRender: import("react").FunctionComponent<import("react").JSX.IntrinsicAttributes>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-tooltip-v3",
3
- "version": "3.53.0-next.4",
3
+ "version": "3.53.0-next.6",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tooltip V3",
6
6
  "files": [
@@ -36,11 +36,11 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-floating-context": "3.53.0-next.4",
40
- "@elliemae/ds-button": "3.53.0-next.4",
41
- "@elliemae/ds-props-helpers": "3.53.0-next.4",
42
- "@elliemae/ds-shared": "3.53.0-next.4",
43
- "@elliemae/ds-system": "3.53.0-next.4"
39
+ "@elliemae/ds-button": "3.53.0-next.6",
40
+ "@elliemae/ds-props-helpers": "3.53.0-next.6",
41
+ "@elliemae/ds-system": "3.53.0-next.6",
42
+ "@elliemae/ds-shared": "3.53.0-next.6",
43
+ "@elliemae/ds-floating-context": "3.53.0-next.6"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@elliemae/pui-cli": "9.0.0-next.63",
@@ -48,8 +48,8 @@
48
48
  "react": "^18.3.1",
49
49
  "react-dom": "^18.3.1",
50
50
  "styled-components": "~5.3.9",
51
- "@elliemae/ds-monorepo-devops": "3.53.0-next.4",
52
- "@elliemae/ds-grid": "3.53.0-next.4"
51
+ "@elliemae/ds-grid": "3.53.0-next.6",
52
+ "@elliemae/ds-monorepo-devops": "3.53.0-next.6"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "react": "^18.3.1",
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "scripts": {
64
64
  "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
65
- "test": "pui-cli test --passWithNoTests --coverage=\"false\" && [ -n \"$CI\" ] || playwright test -c ./playwright.config.mjs",
65
+ "test": "[ -n \"$CI\" ] || playwright test -c ./playwright.config.mjs && pui-cli test --passWithNoTests --coverage=\"false\"",
66
66
  "lint": "node ../../../scripts/lint.mjs --fix",
67
67
  "lint:strict": "node ../../../scripts/lint-strict.mjs",
68
68
  "dts": "node ../../../scripts/dts.mjs",