@elliemae/ds-floating-context 3.45.0-rc.0 → 3.45.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,16 +62,25 @@ const FloatingWrapper = (props) => {
62
62
  }
63
63
  }, [isOpen, withoutAnimation]);
64
64
  const contentJSX = (0, import_react.useMemo)(
65
- () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledFloatingWrapper, { innerRef, style: floatingStyles, ...xstyledProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
66
- import_styled.StyledFloatingAnimation,
65
+ () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
66
+ import_styled.StyledFloatingWrapper,
67
67
  {
68
- onAnimationEnd: checkAnimationStatus,
69
- isOpen,
70
- animationDuration,
71
- withoutAnimation,
72
- children
68
+ innerRef,
69
+ style: floatingStyles,
70
+ ...xstyledProps,
71
+ role: !withoutPortal ? "complementary" : "",
72
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ import_styled.StyledFloatingAnimation,
74
+ {
75
+ onAnimationEnd: checkAnimationStatus,
76
+ isOpen,
77
+ animationDuration,
78
+ withoutAnimation,
79
+ children
80
+ }
81
+ )
73
82
  }
74
- ) }),
83
+ ),
75
84
  [
76
85
  animationDuration,
77
86
  checkAnimationStatus,
@@ -80,6 +89,7 @@ const FloatingWrapper = (props) => {
80
89
  innerRef,
81
90
  isOpen,
82
91
  withoutAnimation,
92
+ withoutPortal,
83
93
  xstyledProps
84
94
  ]
85
95
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/parts/FloatingWrapper/FloatingWrapper.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useMemo, useState, useCallback, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { StyledFloatingAnimation, StyledFloatingWrapper } from './styled.js';\nimport { type DSFloatingWrapperT, DSFloatingWrapperPropTypes } from './react-desc-prop-types.js';\nimport { useFloatingWrapper } from './config/useFloatingWrapper.js';\nimport { DSFloatingWrapperName } from './constants/index.js';\n\nconst FloatingWrapper: React.ComponentType<DSFloatingWrapperT.Props> = (props) => {\n const { propsWithDefault, xstyledProps } = useFloatingWrapper(props);\n const {\n children,\n innerRef,\n floatingStyles,\n isOpen,\n context: { portalDOMContainer, withoutPortal, animationDuration, withoutAnimation },\n } = propsWithDefault;\n const [isAnimating, setIsAnimating] = useState(false);\n useEffect(() => {\n if (isOpen && !withoutAnimation) {\n setIsAnimating(true);\n }\n }, [isOpen, withoutAnimation]);\n\n const checkAnimationStatus = useCallback(() => {\n if (!isOpen && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [isOpen, withoutAnimation]);\n\n const contentJSX = useMemo(\n () => (\n <StyledFloatingWrapper innerRef={innerRef} style={floatingStyles} {...xstyledProps}>\n <StyledFloatingAnimation\n onAnimationEnd={checkAnimationStatus}\n isOpen={isOpen}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n >\n {children}\n </StyledFloatingAnimation>\n </StyledFloatingWrapper>\n ),\n [\n animationDuration,\n checkAnimationStatus,\n children,\n floatingStyles,\n innerRef,\n isOpen,\n withoutAnimation,\n xstyledProps,\n ],\n );\n if (isOpen || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (!withoutPortal) return <>{createPortal(contentJSX, portalDOMContainer || document.body)}</>;\n }\n return null;\n};\n\nFloatingWrapper.displayName = DSFloatingWrapperName;\nconst FloatingWrapperWithSchema = describe(FloatingWrapper);\nFloatingWrapperWithSchema.propTypes = DSFloatingWrapperPropTypes as unknown as ValidationMap<DSFloatingWrapperT.Props>;\nexport { FloatingWrapper, FloatingWrapperWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiCf;AAjCR,mBAAiE;AACjE,uBAA6B;AAC7B,8BAA6C;AAC7C,oBAA+D;AAC/D,mCAAoE;AACpE,gCAAmC;AACnC,uBAAsC;AAEtC,MAAM,kBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,aAAa,QAAI,8CAAmB,KAAK;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,EAAE,oBAAoB,eAAe,mBAAmB,iBAAiB;AAAA,EACpF,IAAI;AACJ,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AACpD,8BAAU,MAAM;AACd,QAAI,UAAU,CAAC,kBAAkB;AAC/B,qBAAe,IAAI;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,2BAAuB,0BAAY,MAAM;AAC7C,QAAI,CAAC,UAAU,CAAC,kBAAkB;AAChC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,iBAAa;AAAA,IACjB,MACE,4CAAC,uCAAsB,UAAoB,OAAO,gBAAiB,GAAG,cACpE;AAAA,MAAC;AAAA;AAAA,QACC,gBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH,GACF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,MAAI,UAAU,aAAa;AACzB,QAAI,kBAAkB,KAAM,QAAO;AACnC,QAAI,CAAC,cAAe,QAAO,2EAAG,6CAAa,YAAY,sBAAsB,SAAS,IAAI,GAAE;AAAA,EAC9F;AACA,SAAO;AACT;AAEA,gBAAgB,cAAc;AAC9B,MAAM,gCAA4B,kCAAS,eAAe;AAC1D,0BAA0B,YAAY;",
4
+ "sourcesContent": ["import React, { useMemo, useState, useCallback, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { StyledFloatingAnimation, StyledFloatingWrapper } from './styled.js';\nimport { type DSFloatingWrapperT, DSFloatingWrapperPropTypes } from './react-desc-prop-types.js';\nimport { useFloatingWrapper } from './config/useFloatingWrapper.js';\nimport { DSFloatingWrapperName } from './constants/index.js';\n\nconst FloatingWrapper: React.ComponentType<DSFloatingWrapperT.Props> = (props) => {\n const { propsWithDefault, xstyledProps } = useFloatingWrapper(props);\n const {\n children,\n innerRef,\n floatingStyles,\n isOpen,\n context: { portalDOMContainer, withoutPortal, animationDuration, withoutAnimation },\n } = propsWithDefault;\n const [isAnimating, setIsAnimating] = useState(false);\n useEffect(() => {\n if (isOpen && !withoutAnimation) {\n setIsAnimating(true);\n }\n }, [isOpen, withoutAnimation]);\n\n const checkAnimationStatus = useCallback(() => {\n if (!isOpen && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [isOpen, withoutAnimation]);\n\n const contentJSX = useMemo(\n () => (\n <StyledFloatingWrapper\n innerRef={innerRef}\n style={floatingStyles}\n {...xstyledProps}\n role={!withoutPortal ? 'complementary' : ''}\n >\n <StyledFloatingAnimation\n onAnimationEnd={checkAnimationStatus}\n isOpen={isOpen}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n >\n {children}\n </StyledFloatingAnimation>\n </StyledFloatingWrapper>\n ),\n [\n animationDuration,\n checkAnimationStatus,\n children,\n floatingStyles,\n innerRef,\n isOpen,\n withoutAnimation,\n withoutPortal,\n xstyledProps,\n ],\n );\n if (isOpen || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (!withoutPortal) return <>{createPortal(contentJSX, portalDOMContainer || document.body)}</>;\n }\n return null;\n};\n\nFloatingWrapper.displayName = DSFloatingWrapperName;\nconst FloatingWrapperWithSchema = describe(FloatingWrapper);\nFloatingWrapperWithSchema.propTypes = DSFloatingWrapperPropTypes as unknown as ValidationMap<DSFloatingWrapperT.Props>;\nexport { FloatingWrapper, FloatingWrapperWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCf;AAtCR,mBAAiE;AACjE,uBAA6B;AAC7B,8BAA6C;AAC7C,oBAA+D;AAC/D,mCAAoE;AACpE,gCAAmC;AACnC,uBAAsC;AAEtC,MAAM,kBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,aAAa,QAAI,8CAAmB,KAAK;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,EAAE,oBAAoB,eAAe,mBAAmB,iBAAiB;AAAA,EACpF,IAAI;AACJ,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AACpD,8BAAU,MAAM;AACd,QAAI,UAAU,CAAC,kBAAkB;AAC/B,qBAAe,IAAI;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,2BAAuB,0BAAY,MAAM;AAC7C,QAAI,CAAC,UAAU,CAAC,kBAAkB;AAChC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,iBAAa;AAAA,IACjB,MACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ,MAAM,CAAC,gBAAgB,kBAAkB;AAAA,QAEzC;AAAA,UAAC;AAAA;AAAA,YACC,gBAAgB;AAAA,YAChB;AAAA,YACA;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,MAAI,UAAU,aAAa;AACzB,QAAI,kBAAkB,KAAM,QAAO;AACnC,QAAI,CAAC,cAAe,QAAO,2EAAG,6CAAa,YAAY,sBAAsB,SAAS,IAAI,GAAE;AAAA,EAC9F;AACA,SAAO;AACT;AAEA,gBAAgB,cAAc;AAC9B,MAAM,gCAA4B,kCAAS,eAAe;AAC1D,0BAA0B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -62,22 +62,20 @@ const DSFloatingContextPropTypes = {
62
62
  "left-start"
63
63
  ]).description("The placement of the tooltip.").defaultValue("top"),
64
64
  customOffset: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.number).description("The custom offset of the tooltip.").defaultValue([12, 12]),
65
- placementOrderPreference: import_ds_props_helpers.PropTypes.arrayOf(
66
- import_ds_props_helpers.PropTypes.oneOf([
67
- "top-start",
68
- "top",
69
- "top-end",
70
- "right-start",
71
- "right",
72
- "right-end",
73
- "bottom-end",
74
- "bottom",
75
- "bottom-start",
76
- "left-end",
77
- "left",
78
- "left-start"
79
- ])
80
- ).description("The order of the placement preference."),
65
+ placementOrderPreference: import_ds_props_helpers.PropTypes.oneOfType([
66
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["top-start"])]),
67
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["top"])]),
68
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["top-end"])]),
69
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["right-start"])]),
70
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["right"])]),
71
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["right-end"])]),
72
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["bottom-end"])]),
73
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["bottom"])]),
74
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["bottom-start"])]),
75
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["left-end"])]),
76
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["left"])]),
77
+ import_ds_props_helpers.PropTypes.tuple([import_ds_props_helpers.PropTypes.oneOf(["left-start"])])
78
+ ]).description("The order of the placement preference."),
81
79
  onOpen: import_ds_props_helpers.PropTypes.func.description("Callback when the tooltip is opened."),
82
80
  onClose: import_ds_props_helpers.PropTypes.func.description("Callback when the tooltip is closed.")
83
81
  };
@@ -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": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nexport declare namespace DSHookFloatingContextT {\n export interface DefaultProps {\n withoutPortal: boolean;\n withoutAnimation: boolean;\n portalDOMContainer: HTMLElement;\n animationDuration: number;\n placement: PopperPlacementsT;\n customOffset: [number, number];\n }\n\n export interface OptionalProps {\n placementOrderPreference?: PopperPlacementsT[];\n onOpen?: () => void;\n onClose?: () => void;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n}\n\nexport const defaultProps: DSHookFloatingContextT.DefaultProps = {\n withoutAnimation: false,\n animationDuration: 300,\n portalDOMContainer: document.body,\n withoutPortal: false,\n placement: 'top',\n customOffset: [12, 12],\n};\n\nexport const DSFloatingContextPropTypes: DSPropTypesSchema<DSHookFloatingContextT.Props> = {\n withoutPortal: PropTypes.bool\n .description('If true, the tooltip will not be rendered inside a portal.')\n .defaultValue(false),\n withoutAnimation: PropTypes.bool.description('If true, the tooltip will not have an animation.').defaultValue(false),\n portalDOMContainer: PropTypes.instanceOf(HTMLElement)\n .description('The DOM element where the tooltip will be rendered.')\n .defaultValue(document.body),\n animationDuration: PropTypes.number.description('The duration of the animation in milliseconds.').defaultValue(300),\n placement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('The placement of the tooltip.')\n .defaultValue('top'),\n customOffset: PropTypes.arrayOf(PropTypes.number)\n .description('The custom offset of the tooltip.')\n .defaultValue([12, 12]),\n placementOrderPreference: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ]),\n ).description('The order of the placement preference.'),\n onOpen: PropTypes.func.description('Callback when the tooltip is opened.'),\n onClose: PropTypes.func.description('Callback when the tooltip is closed.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AAmCnB,MAAM,eAAoD;AAAA,EAC/D,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,oBAAoB,SAAS;AAAA,EAC7B,eAAe;AAAA,EACf,WAAW;AAAA,EACX,cAAc,CAAC,IAAI,EAAE;AACvB;AAEO,MAAM,6BAA8E;AAAA,EACzF,eAAe,kCAAU,KACtB,YAAY,4DAA4D,EACxE,aAAa,KAAK;AAAA,EACrB,kBAAkB,kCAAU,KAAK,YAAY,kDAAkD,EAAE,aAAa,KAAK;AAAA,EACnH,oBAAoB,kCAAU,WAAW,WAAW,EACjD,YAAY,qDAAqD,EACjE,aAAa,SAAS,IAAI;AAAA,EAC7B,mBAAmB,kCAAU,OAAO,YAAY,gDAAgD,EAAE,aAAa,GAAG;AAAA,EAClH,WAAW,kCAAU,MAAM;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+BAA+B,EAC3C,aAAa,KAAK;AAAA,EACrB,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAC7C,YAAY,mCAAmC,EAC/C,aAAa,CAAC,IAAI,EAAE,CAAC;AAAA,EACxB,0BAA0B,kCAAU;AAAA,IAClC,kCAAU,MAAM;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,EAAE,YAAY,wCAAwC;AAAA,EACtD,QAAQ,kCAAU,KAAK,YAAY,sCAAsC;AAAA,EACzE,SAAS,kCAAU,KAAK,YAAY,sCAAsC;AAC5E;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nexport declare namespace DSHookFloatingContextT {\n export interface DefaultProps {\n withoutPortal: boolean;\n withoutAnimation: boolean;\n portalDOMContainer: HTMLElement;\n animationDuration: number;\n placement: PopperPlacementsT;\n customOffset: [number, number];\n }\n\n export interface OptionalProps {\n placementOrderPreference?: PopperPlacementsT[];\n onOpen?: () => void;\n onClose?: () => void;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n}\n\nexport const defaultProps: DSHookFloatingContextT.DefaultProps = {\n withoutAnimation: false,\n animationDuration: 300,\n portalDOMContainer: document.body,\n withoutPortal: false,\n placement: 'top',\n customOffset: [12, 12],\n};\n\nexport const DSFloatingContextPropTypes: DSPropTypesSchema<DSHookFloatingContextT.Props> = {\n withoutPortal: PropTypes.bool\n .description('If true, the tooltip will not be rendered inside a portal.')\n .defaultValue(false),\n withoutAnimation: PropTypes.bool.description('If true, the tooltip will not have an animation.').defaultValue(false),\n portalDOMContainer: PropTypes.instanceOf(HTMLElement)\n .description('The DOM element where the tooltip will be rendered.')\n .defaultValue(document.body),\n animationDuration: PropTypes.number.description('The duration of the animation in milliseconds.').defaultValue(300),\n placement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('The placement of the tooltip.')\n .defaultValue('top'),\n customOffset: PropTypes.arrayOf(PropTypes.number)\n .description('The custom offset of the tooltip.')\n .defaultValue([12, 12]),\n placementOrderPreference: PropTypes.oneOfType([\n PropTypes.tuple([PropTypes.oneOf(['top-start'])]),\n PropTypes.tuple([PropTypes.oneOf(['top'])]),\n PropTypes.tuple([PropTypes.oneOf(['top-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['right-start'])]),\n PropTypes.tuple([PropTypes.oneOf(['right'])]),\n PropTypes.tuple([PropTypes.oneOf(['right-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['bottom-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['bottom'])]),\n PropTypes.tuple([PropTypes.oneOf(['bottom-start'])]),\n PropTypes.tuple([PropTypes.oneOf(['left-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['left'])]),\n PropTypes.tuple([PropTypes.oneOf(['left-start'])]),\n ]).description('The order of the placement preference.'),\n onOpen: PropTypes.func.description('Callback when the tooltip is opened.'),\n onClose: PropTypes.func.description('Callback when the tooltip is closed.'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AAmCnB,MAAM,eAAoD;AAAA,EAC/D,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,oBAAoB,SAAS;AAAA,EAC7B,eAAe;AAAA,EACf,WAAW;AAAA,EACX,cAAc,CAAC,IAAI,EAAE;AACvB;AAEO,MAAM,6BAA8E;AAAA,EACzF,eAAe,kCAAU,KACtB,YAAY,4DAA4D,EACxE,aAAa,KAAK;AAAA,EACrB,kBAAkB,kCAAU,KAAK,YAAY,kDAAkD,EAAE,aAAa,KAAK;AAAA,EACnH,oBAAoB,kCAAU,WAAW,WAAW,EACjD,YAAY,qDAAqD,EACjE,aAAa,SAAS,IAAI;AAAA,EAC7B,mBAAmB,kCAAU,OAAO,YAAY,gDAAgD,EAAE,aAAa,GAAG;AAAA,EAClH,WAAW,kCAAU,MAAM;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+BAA+B,EAC3C,aAAa,KAAK;AAAA,EACrB,cAAc,kCAAU,QAAQ,kCAAU,MAAM,EAC7C,YAAY,mCAAmC,EAC/C,aAAa,CAAC,IAAI,EAAE,CAAC;AAAA,EACxB,0BAA0B,kCAAU,UAAU;AAAA,IAC5C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAAA,IAChD,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAAA,IAC1C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;AAAA,IAC9C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AAAA,IAClD,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AAAA,IAC5C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAAA,IAChD,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAAA,IACjD,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAAA,IAC7C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;AAAA,IACnD,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AAAA,IAC/C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAAA,IAC3C,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAAA,EACnD,CAAC,EAAE,YAAY,wCAAwC;AAAA,EACvD,QAAQ,kCAAU,KAAK,YAAY,sCAAsC;AAAA,EACzE,SAAS,kCAAU,KAAK,YAAY,sCAAsC;AAC5E;",
6
6
  "names": []
7
7
  }
@@ -28,16 +28,25 @@ const FloatingWrapper = (props) => {
28
28
  }
29
29
  }, [isOpen, withoutAnimation]);
30
30
  const contentJSX = useMemo(
31
- () => /* @__PURE__ */ jsx(StyledFloatingWrapper, { innerRef, style: floatingStyles, ...xstyledProps, children: /* @__PURE__ */ jsx(
32
- StyledFloatingAnimation,
31
+ () => /* @__PURE__ */ jsx(
32
+ StyledFloatingWrapper,
33
33
  {
34
- onAnimationEnd: checkAnimationStatus,
35
- isOpen,
36
- animationDuration,
37
- withoutAnimation,
38
- children
34
+ innerRef,
35
+ style: floatingStyles,
36
+ ...xstyledProps,
37
+ role: !withoutPortal ? "complementary" : "",
38
+ children: /* @__PURE__ */ jsx(
39
+ StyledFloatingAnimation,
40
+ {
41
+ onAnimationEnd: checkAnimationStatus,
42
+ isOpen,
43
+ animationDuration,
44
+ withoutAnimation,
45
+ children
46
+ }
47
+ )
39
48
  }
40
- ) }),
49
+ ),
41
50
  [
42
51
  animationDuration,
43
52
  checkAnimationStatus,
@@ -46,6 +55,7 @@ const FloatingWrapper = (props) => {
46
55
  innerRef,
47
56
  isOpen,
48
57
  withoutAnimation,
58
+ withoutPortal,
49
59
  xstyledProps
50
60
  ]
51
61
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/FloatingWrapper/FloatingWrapper.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo, useState, useCallback, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { StyledFloatingAnimation, StyledFloatingWrapper } from './styled.js';\nimport { type DSFloatingWrapperT, DSFloatingWrapperPropTypes } from './react-desc-prop-types.js';\nimport { useFloatingWrapper } from './config/useFloatingWrapper.js';\nimport { DSFloatingWrapperName } from './constants/index.js';\n\nconst FloatingWrapper: React.ComponentType<DSFloatingWrapperT.Props> = (props) => {\n const { propsWithDefault, xstyledProps } = useFloatingWrapper(props);\n const {\n children,\n innerRef,\n floatingStyles,\n isOpen,\n context: { portalDOMContainer, withoutPortal, animationDuration, withoutAnimation },\n } = propsWithDefault;\n const [isAnimating, setIsAnimating] = useState(false);\n useEffect(() => {\n if (isOpen && !withoutAnimation) {\n setIsAnimating(true);\n }\n }, [isOpen, withoutAnimation]);\n\n const checkAnimationStatus = useCallback(() => {\n if (!isOpen && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [isOpen, withoutAnimation]);\n\n const contentJSX = useMemo(\n () => (\n <StyledFloatingWrapper innerRef={innerRef} style={floatingStyles} {...xstyledProps}>\n <StyledFloatingAnimation\n onAnimationEnd={checkAnimationStatus}\n isOpen={isOpen}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n >\n {children}\n </StyledFloatingAnimation>\n </StyledFloatingWrapper>\n ),\n [\n animationDuration,\n checkAnimationStatus,\n children,\n floatingStyles,\n innerRef,\n isOpen,\n withoutAnimation,\n xstyledProps,\n ],\n );\n if (isOpen || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (!withoutPortal) return <>{createPortal(contentJSX, portalDOMContainer || document.body)}</>;\n }\n return null;\n};\n\nFloatingWrapper.displayName = DSFloatingWrapperName;\nconst FloatingWrapperWithSchema = describe(FloatingWrapper);\nFloatingWrapperWithSchema.propTypes = DSFloatingWrapperPropTypes as unknown as ValidationMap<DSFloatingWrapperT.Props>;\nexport { FloatingWrapper, FloatingWrapperWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiCf,SAuBuB,UAvBvB;AAjCR,SAAgB,SAAS,UAAU,aAAa,iBAAiB;AACjE,SAAS,oBAAoB;AAC7B,SAAS,gBAAoC;AAC7C,SAAS,yBAAyB,6BAA6B;AAC/D,SAAkC,kCAAkC;AACpE,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AAEtC,MAAM,kBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,aAAa,IAAI,mBAAmB,KAAK;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,EAAE,oBAAoB,eAAe,mBAAmB,iBAAiB;AAAA,EACpF,IAAI;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,YAAU,MAAM;AACd,QAAI,UAAU,CAAC,kBAAkB;AAC/B,qBAAe,IAAI;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,UAAU,CAAC,kBAAkB;AAChC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,aAAa;AAAA,IACjB,MACE,oBAAC,yBAAsB,UAAoB,OAAO,gBAAiB,GAAG,cACpE;AAAA,MAAC;AAAA;AAAA,QACC,gBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH,GACF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,MAAI,UAAU,aAAa;AACzB,QAAI,kBAAkB,KAAM,QAAO;AACnC,QAAI,CAAC,cAAe,QAAO,gCAAG,uBAAa,YAAY,sBAAsB,SAAS,IAAI,GAAE;AAAA,EAC9F;AACA,SAAO;AACT;AAEA,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo, useState, useCallback, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe, type ValidationMap } from '@elliemae/ds-props-helpers';\nimport { StyledFloatingAnimation, StyledFloatingWrapper } from './styled.js';\nimport { type DSFloatingWrapperT, DSFloatingWrapperPropTypes } from './react-desc-prop-types.js';\nimport { useFloatingWrapper } from './config/useFloatingWrapper.js';\nimport { DSFloatingWrapperName } from './constants/index.js';\n\nconst FloatingWrapper: React.ComponentType<DSFloatingWrapperT.Props> = (props) => {\n const { propsWithDefault, xstyledProps } = useFloatingWrapper(props);\n const {\n children,\n innerRef,\n floatingStyles,\n isOpen,\n context: { portalDOMContainer, withoutPortal, animationDuration, withoutAnimation },\n } = propsWithDefault;\n const [isAnimating, setIsAnimating] = useState(false);\n useEffect(() => {\n if (isOpen && !withoutAnimation) {\n setIsAnimating(true);\n }\n }, [isOpen, withoutAnimation]);\n\n const checkAnimationStatus = useCallback(() => {\n if (!isOpen && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [isOpen, withoutAnimation]);\n\n const contentJSX = useMemo(\n () => (\n <StyledFloatingWrapper\n innerRef={innerRef}\n style={floatingStyles}\n {...xstyledProps}\n role={!withoutPortal ? 'complementary' : ''}\n >\n <StyledFloatingAnimation\n onAnimationEnd={checkAnimationStatus}\n isOpen={isOpen}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n >\n {children}\n </StyledFloatingAnimation>\n </StyledFloatingWrapper>\n ),\n [\n animationDuration,\n checkAnimationStatus,\n children,\n floatingStyles,\n innerRef,\n isOpen,\n withoutAnimation,\n withoutPortal,\n xstyledProps,\n ],\n );\n if (isOpen || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (!withoutPortal) return <>{createPortal(contentJSX, portalDOMContainer || document.body)}</>;\n }\n return null;\n};\n\nFloatingWrapper.displayName = DSFloatingWrapperName;\nconst FloatingWrapperWithSchema = describe(FloatingWrapper);\nFloatingWrapperWithSchema.propTypes = DSFloatingWrapperPropTypes as unknown as ValidationMap<DSFloatingWrapperT.Props>;\nexport { FloatingWrapper, FloatingWrapperWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACsCf,SAwBuB,UAxBvB;AAtCR,SAAgB,SAAS,UAAU,aAAa,iBAAiB;AACjE,SAAS,oBAAoB;AAC7B,SAAS,gBAAoC;AAC7C,SAAS,yBAAyB,6BAA6B;AAC/D,SAAkC,kCAAkC;AACpE,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AAEtC,MAAM,kBAAiE,CAAC,UAAU;AAChF,QAAM,EAAE,kBAAkB,aAAa,IAAI,mBAAmB,KAAK;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,EAAE,oBAAoB,eAAe,mBAAmB,iBAAiB;AAAA,EACpF,IAAI;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,YAAU,MAAM;AACd,QAAI,UAAU,CAAC,kBAAkB;AAC/B,qBAAe,IAAI;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,UAAU,CAAC,kBAAkB;AAChC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC;AAE7B,QAAM,aAAa;AAAA,IACjB,MACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ,MAAM,CAAC,gBAAgB,kBAAkB;AAAA,QAEzC;AAAA,UAAC;AAAA;AAAA,YACC,gBAAgB;AAAA,YAChB;AAAA,YACA;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,MAAI,UAAU,aAAa;AACzB,QAAI,kBAAkB,KAAM,QAAO;AACnC,QAAI,CAAC,cAAe,QAAO,gCAAG,uBAAa,YAAY,sBAAsB,SAAS,IAAI,GAAE;AAAA,EAC9F;AACA,SAAO;AACT;AAEA,gBAAgB,cAAc;AAC9B,MAAM,4BAA4B,SAAS,eAAe;AAC1D,0BAA0B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -28,22 +28,20 @@ const DSFloatingContextPropTypes = {
28
28
  "left-start"
29
29
  ]).description("The placement of the tooltip.").defaultValue("top"),
30
30
  customOffset: PropTypes.arrayOf(PropTypes.number).description("The custom offset of the tooltip.").defaultValue([12, 12]),
31
- placementOrderPreference: PropTypes.arrayOf(
32
- PropTypes.oneOf([
33
- "top-start",
34
- "top",
35
- "top-end",
36
- "right-start",
37
- "right",
38
- "right-end",
39
- "bottom-end",
40
- "bottom",
41
- "bottom-start",
42
- "left-end",
43
- "left",
44
- "left-start"
45
- ])
46
- ).description("The order of the placement preference."),
31
+ placementOrderPreference: PropTypes.oneOfType([
32
+ PropTypes.tuple([PropTypes.oneOf(["top-start"])]),
33
+ PropTypes.tuple([PropTypes.oneOf(["top"])]),
34
+ PropTypes.tuple([PropTypes.oneOf(["top-end"])]),
35
+ PropTypes.tuple([PropTypes.oneOf(["right-start"])]),
36
+ PropTypes.tuple([PropTypes.oneOf(["right"])]),
37
+ PropTypes.tuple([PropTypes.oneOf(["right-end"])]),
38
+ PropTypes.tuple([PropTypes.oneOf(["bottom-end"])]),
39
+ PropTypes.tuple([PropTypes.oneOf(["bottom"])]),
40
+ PropTypes.tuple([PropTypes.oneOf(["bottom-start"])]),
41
+ PropTypes.tuple([PropTypes.oneOf(["left-end"])]),
42
+ PropTypes.tuple([PropTypes.oneOf(["left"])]),
43
+ PropTypes.tuple([PropTypes.oneOf(["left-start"])])
44
+ ]).description("The order of the placement preference."),
47
45
  onOpen: PropTypes.func.description("Callback when the tooltip is opened."),
48
46
  onClose: PropTypes.func.description("Callback when the tooltip is closed.")
49
47
  };
@@ -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", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nexport declare namespace DSHookFloatingContextT {\n export interface DefaultProps {\n withoutPortal: boolean;\n withoutAnimation: boolean;\n portalDOMContainer: HTMLElement;\n animationDuration: number;\n placement: PopperPlacementsT;\n customOffset: [number, number];\n }\n\n export interface OptionalProps {\n placementOrderPreference?: PopperPlacementsT[];\n onOpen?: () => void;\n onClose?: () => void;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n}\n\nexport const defaultProps: DSHookFloatingContextT.DefaultProps = {\n withoutAnimation: false,\n animationDuration: 300,\n portalDOMContainer: document.body,\n withoutPortal: false,\n placement: 'top',\n customOffset: [12, 12],\n};\n\nexport const DSFloatingContextPropTypes: DSPropTypesSchema<DSHookFloatingContextT.Props> = {\n withoutPortal: PropTypes.bool\n .description('If true, the tooltip will not be rendered inside a portal.')\n .defaultValue(false),\n withoutAnimation: PropTypes.bool.description('If true, the tooltip will not have an animation.').defaultValue(false),\n portalDOMContainer: PropTypes.instanceOf(HTMLElement)\n .description('The DOM element where the tooltip will be rendered.')\n .defaultValue(document.body),\n animationDuration: PropTypes.number.description('The duration of the animation in milliseconds.').defaultValue(300),\n placement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('The placement of the tooltip.')\n .defaultValue('top'),\n customOffset: PropTypes.arrayOf(PropTypes.number)\n .description('The custom offset of the tooltip.')\n .defaultValue([12, 12]),\n placementOrderPreference: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ]),\n ).description('The order of the placement preference.'),\n onOpen: PropTypes.func.description('Callback when the tooltip is opened.'),\n onClose: PropTypes.func.description('Callback when the tooltip is closed.'),\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AAmCnB,MAAM,eAAoD;AAAA,EAC/D,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,oBAAoB,SAAS;AAAA,EAC7B,eAAe;AAAA,EACf,WAAW;AAAA,EACX,cAAc,CAAC,IAAI,EAAE;AACvB;AAEO,MAAM,6BAA8E;AAAA,EACzF,eAAe,UAAU,KACtB,YAAY,4DAA4D,EACxE,aAAa,KAAK;AAAA,EACrB,kBAAkB,UAAU,KAAK,YAAY,kDAAkD,EAAE,aAAa,KAAK;AAAA,EACnH,oBAAoB,UAAU,WAAW,WAAW,EACjD,YAAY,qDAAqD,EACjE,aAAa,SAAS,IAAI;AAAA,EAC7B,mBAAmB,UAAU,OAAO,YAAY,gDAAgD,EAAE,aAAa,GAAG;AAAA,EAClH,WAAW,UAAU,MAAM;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+BAA+B,EAC3C,aAAa,KAAK;AAAA,EACrB,cAAc,UAAU,QAAQ,UAAU,MAAM,EAC7C,YAAY,mCAAmC,EAC/C,aAAa,CAAC,IAAI,EAAE,CAAC;AAAA,EACxB,0BAA0B,UAAU;AAAA,IAClC,UAAU,MAAM;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,EAAE,YAAY,wCAAwC;AAAA,EACtD,QAAQ,UAAU,KAAK,YAAY,sCAAsC;AAAA,EACzE,SAAS,UAAU,KAAK,YAAY,sCAAsC;AAC5E;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nexport declare namespace DSHookFloatingContextT {\n export interface DefaultProps {\n withoutPortal: boolean;\n withoutAnimation: boolean;\n portalDOMContainer: HTMLElement;\n animationDuration: number;\n placement: PopperPlacementsT;\n customOffset: [number, number];\n }\n\n export interface OptionalProps {\n placementOrderPreference?: PopperPlacementsT[];\n onOpen?: () => void;\n onClose?: () => void;\n }\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n\n export type PopperPlacementsT =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n}\n\nexport const defaultProps: DSHookFloatingContextT.DefaultProps = {\n withoutAnimation: false,\n animationDuration: 300,\n portalDOMContainer: document.body,\n withoutPortal: false,\n placement: 'top',\n customOffset: [12, 12],\n};\n\nexport const DSFloatingContextPropTypes: DSPropTypesSchema<DSHookFloatingContextT.Props> = {\n withoutPortal: PropTypes.bool\n .description('If true, the tooltip will not be rendered inside a portal.')\n .defaultValue(false),\n withoutAnimation: PropTypes.bool.description('If true, the tooltip will not have an animation.').defaultValue(false),\n portalDOMContainer: PropTypes.instanceOf(HTMLElement)\n .description('The DOM element where the tooltip will be rendered.')\n .defaultValue(document.body),\n animationDuration: PropTypes.number.description('The duration of the animation in milliseconds.').defaultValue(300),\n placement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('The placement of the tooltip.')\n .defaultValue('top'),\n customOffset: PropTypes.arrayOf(PropTypes.number)\n .description('The custom offset of the tooltip.')\n .defaultValue([12, 12]),\n placementOrderPreference: PropTypes.oneOfType([\n PropTypes.tuple([PropTypes.oneOf(['top-start'])]),\n PropTypes.tuple([PropTypes.oneOf(['top'])]),\n PropTypes.tuple([PropTypes.oneOf(['top-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['right-start'])]),\n PropTypes.tuple([PropTypes.oneOf(['right'])]),\n PropTypes.tuple([PropTypes.oneOf(['right-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['bottom-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['bottom'])]),\n PropTypes.tuple([PropTypes.oneOf(['bottom-start'])]),\n PropTypes.tuple([PropTypes.oneOf(['left-end'])]),\n PropTypes.tuple([PropTypes.oneOf(['left'])]),\n PropTypes.tuple([PropTypes.oneOf(['left-start'])]),\n ]).description('The order of the placement preference.'),\n onOpen: PropTypes.func.description('Callback when the tooltip is opened.'),\n onClose: PropTypes.func.description('Callback when the tooltip is closed.'),\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AAmCnB,MAAM,eAAoD;AAAA,EAC/D,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,oBAAoB,SAAS;AAAA,EAC7B,eAAe;AAAA,EACf,WAAW;AAAA,EACX,cAAc,CAAC,IAAI,EAAE;AACvB;AAEO,MAAM,6BAA8E;AAAA,EACzF,eAAe,UAAU,KACtB,YAAY,4DAA4D,EACxE,aAAa,KAAK;AAAA,EACrB,kBAAkB,UAAU,KAAK,YAAY,kDAAkD,EAAE,aAAa,KAAK;AAAA,EACnH,oBAAoB,UAAU,WAAW,WAAW,EACjD,YAAY,qDAAqD,EACjE,aAAa,SAAS,IAAI;AAAA,EAC7B,mBAAmB,UAAU,OAAO,YAAY,gDAAgD,EAAE,aAAa,GAAG;AAAA,EAClH,WAAW,UAAU,MAAM;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,+BAA+B,EAC3C,aAAa,KAAK;AAAA,EACrB,cAAc,UAAU,QAAQ,UAAU,MAAM,EAC7C,YAAY,mCAAmC,EAC/C,aAAa,CAAC,IAAI,EAAE,CAAC;AAAA,EACxB,0BAA0B,UAAU,UAAU;AAAA,IAC5C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAAA,IAChD,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAAA,IAC1C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;AAAA,IAC9C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AAAA,IAClD,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;AAAA,IAC5C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAAA,IAChD,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAAA,IACjD,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAAA,IAC7C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;AAAA,IACnD,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;AAAA,IAC/C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;AAAA,IAC3C,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAAA,EACnD,CAAC,EAAE,YAAY,wCAAwC;AAAA,EACvD,QAAQ,UAAU,KAAK,YAAY,sCAAsC;AAAA,EACzE,SAAS,UAAU,KAAK,YAAY,sCAAsC;AAC5E;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-floating-context",
3
- "version": "3.45.0-rc.0",
3
+ "version": "3.45.0-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper Hook",
6
6
  "files": [
@@ -36,14 +36,14 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-props-helpers": "3.45.0-rc.0",
40
- "@elliemae/ds-system": "3.45.0-rc.0",
41
- "@elliemae/ds-hooks-headless-tooltip": "3.45.0-rc.0",
42
- "@elliemae/ds-typescript-helpers": "3.45.0-rc.0"
39
+ "@elliemae/ds-hooks-headless-tooltip": "3.45.0-rc.2",
40
+ "@elliemae/ds-props-helpers": "3.45.0-rc.2",
41
+ "@elliemae/ds-system": "3.45.0-rc.2",
42
+ "@elliemae/ds-typescript-helpers": "3.45.0-rc.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@elliemae/pui-cli": "~9.0.0-next.31",
46
- "@elliemae/ds-monorepo-devops": "3.45.0-rc.0"
46
+ "@elliemae/ds-monorepo-devops": "3.45.0-rc.2"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "lodash": "^4.17.21",