@elliemae/ds-popper 3.14.0-next.4 → 3.14.0-next.5

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.
@@ -67,7 +67,7 @@ class PopperContent extends import_react.PureComponent {
67
67
  ...style,
68
68
  ...(0, import_getArrowStylesBySize.getArrowStylesBySize)(placement, 25)
69
69
  },
70
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 30 30", children: [
70
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 30 30", style: { verticalAlign: "initial" }, children: [
71
71
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
72
  "path",
73
73
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/PopperContent.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Popper } from '@elliemae/react-popper';\nimport { Keyframes, animated } from 'react-spring/renderprops';\nimport getComponentFromProps from '@elliemae/ds-utilities/getComponentFromProps';\nimport DSOverlay from '@elliemae/ds-overlay';\nimport { getArrowStylesBySize } from './getArrowStylesBySize';\n\nconst Content = Keyframes.Spring({});\nconst StyledDiv = styled.div`\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport default class PopperContent extends PureComponent {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = { onContentDestroyed: () => null };\n\n constructor(props) {\n super(props);\n this.renderContent = this.renderContent.bind(this);\n this.renderArrow = this.renderArrow.bind(this);\n this.handleRestAnimation = this.handleRestAnimation.bind(this);\n }\n\n handleRestAnimation() {\n const { isOpen, onContentDestroyed } = this.props;\n if (!isOpen) {\n onContentDestroyed();\n }\n }\n\n renderArrow({ ref, style }, placement) {\n const { blockName, showArrow } = this.props;\n if (!showArrow) return null;\n return (\n <div\n key=\"popper-arrow\"\n ref={ref}\n className={`${blockName || 'popper'}__arrow`}\n data-placement={placement}\n style={{\n ...style,\n ...getArrowStylesBySize(placement, 25),\n }}\n >\n <svg viewBox=\"0 0 30 30\">\n <path\n className=\"stroke\"\n d=\"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26\n C26.7,29,24.6,28.1,23.7,27.1z\"\n />\n <path\n className=\"fill\"\n d=\"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z\"\n />\n </svg>\n </div>\n );\n }\n\n renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries }) {\n const {\n contentComponent,\n contentStyle,\n isOpen,\n closeAnimationConfig,\n openAnimationConfig,\n onMouseEnter,\n onMouseLeave,\n containerProps,\n zIndex,\n hideIfNotVisible,\n } = this.props;\n\n const computedStyle = {\n ...style,\n ...contentStyle,\n };\n return (\n <StyledDiv\n {...containerProps}\n data-placement={placement}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n style={computedStyle}\n data-testid=\"popper-container\"\n zIndex={zIndex}\n >\n <Content\n native\n onRest={this.handleRestAnimation}\n state={isOpen && (!outOfBoundaries || !hideIfNotVisible) ? 'open' : 'close'}\n states={{\n open: {\n ...openAnimationConfig,\n from: closeAnimationConfig.to,\n },\n close: closeAnimationConfig,\n }}\n >\n {(animationStyle) => (\n <animated.div ref={ref} style={animationStyle}>\n {getComponentFromProps(contentComponent, { scheduleUpdate }, [this.renderArrow(arrowProps, placement)])}\n </animated.div>\n )}\n </Content>\n </StyledDiv>\n );\n }\n\n render() {\n const {\n destroyed = false,\n onClickOutside = () => null,\n placement = 'bottom-start',\n modifiers = {},\n referenceNode,\n usePortal = true,\n } = this.props;\n return (\n <DSOverlay isOpen={!destroyed} onClickOutside={onClickOutside} usePortal={usePortal}>\n <Popper modifiers={modifiers} placement={placement} referenceElement={referenceNode}>\n {this.renderContent}\n </Popper>\n </DSOverlay>\n );\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8Cf;AA7CR,mBAAqC;AACrC,uBAAuB;AACvB,0BAAuB;AACvB,yBAAoC;AACpC,mCAAkC;AAClC,wBAAsB;AACtB,kCAAqC;AAErC,MAAM,UAAU,6BAAU,OAAO,CAAC,CAAC;AACnC,MAAM,YAAY,wBAAO;AAAA,aACZ,CAAC,EAAE,QAAQ,MAAM,MAAM,UAAU,MAAM,OAAO;AAAA;AAG3D,MAAO,sBAAoC,2BAAc;AAAA,EAIvD,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,gBAAgB,KAAK,cAAc,KAAK,IAAI;AACjD,SAAK,cAAc,KAAK,YAAY,KAAK,IAAI;AAC7C,SAAK,sBAAsB,KAAK,oBAAoB,KAAK,IAAI;AAAA,EAC/D;AAAA,EAEA,sBAAsB;AACpB,UAAM,EAAE,QAAQ,mBAAmB,IAAI,KAAK;AAC5C,QAAI,CAAC,QAAQ;AACX,yBAAmB;AAAA,IACrB;AAAA,EACF;AAAA,EAEA,YAAY,EAAE,KAAK,MAAM,GAAG,WAAW;AACrC,UAAM,EAAE,WAAW,UAAU,IAAI,KAAK;AACtC,QAAI,CAAC;AAAW,aAAO;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QAEC;AAAA,QACA,WAAW,GAAG,aAAa;AAAA,QAC3B,kBAAgB;AAAA,QAChB,OAAO;AAAA,UACL,GAAG;AAAA,UACH,OAAG,kDAAqB,WAAW,EAAE;AAAA,QACvC;AAAA,QAEA,uDAAC,SAAI,SAAQ,aACX;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,GAAE;AAAA;AAAA,UAEJ;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AW,gBAAgC,WAC7D,sDAAC,8BAAO,WAAsB,WAAsB,kBAAkB,eACnE,eAAK,eACR,GACF;AAAA,EAEJ;AACF;AAlHqB,cAEZ,eAAe,EAAE,oBAAoB,MAAM,KAAK;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Popper } from '@elliemae/react-popper';\nimport { Keyframes, animated } from 'react-spring/renderprops';\nimport getComponentFromProps from '@elliemae/ds-utilities/getComponentFromProps';\nimport DSOverlay from '@elliemae/ds-overlay';\nimport { getArrowStylesBySize } from './getArrowStylesBySize';\n\nconst Content = Keyframes.Spring({});\nconst StyledDiv = styled.div`\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport default class PopperContent extends PureComponent {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = { onContentDestroyed: () => null };\n\n constructor(props) {\n super(props);\n this.renderContent = this.renderContent.bind(this);\n this.renderArrow = this.renderArrow.bind(this);\n this.handleRestAnimation = this.handleRestAnimation.bind(this);\n }\n\n handleRestAnimation() {\n const { isOpen, onContentDestroyed } = this.props;\n if (!isOpen) {\n onContentDestroyed();\n }\n }\n\n renderArrow({ ref, style }, placement) {\n const { blockName, showArrow } = this.props;\n if (!showArrow) return null;\n return (\n <div\n key=\"popper-arrow\"\n ref={ref}\n className={`${blockName || 'popper'}__arrow`}\n data-placement={placement}\n style={{\n ...style,\n ...getArrowStylesBySize(placement, 25),\n }}\n >\n <svg viewBox=\"0 0 30 30\" style={{ verticalAlign: 'initial' }}>\n <path\n className=\"stroke\"\n d=\"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26\n C26.7,29,24.6,28.1,23.7,27.1z\"\n />\n <path\n className=\"fill\"\n d=\"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z\"\n />\n </svg>\n </div>\n );\n }\n\n renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries }) {\n const {\n contentComponent,\n contentStyle,\n isOpen,\n closeAnimationConfig,\n openAnimationConfig,\n onMouseEnter,\n onMouseLeave,\n containerProps,\n zIndex,\n hideIfNotVisible,\n } = this.props;\n\n const computedStyle = {\n ...style,\n ...contentStyle,\n };\n return (\n <StyledDiv\n {...containerProps}\n data-placement={placement}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n style={computedStyle}\n data-testid=\"popper-container\"\n zIndex={zIndex}\n >\n <Content\n native\n onRest={this.handleRestAnimation}\n state={isOpen && (!outOfBoundaries || !hideIfNotVisible) ? 'open' : 'close'}\n states={{\n open: {\n ...openAnimationConfig,\n from: closeAnimationConfig.to,\n },\n close: closeAnimationConfig,\n }}\n >\n {(animationStyle) => (\n <animated.div ref={ref} style={animationStyle}>\n {getComponentFromProps(contentComponent, { scheduleUpdate }, [this.renderArrow(arrowProps, placement)])}\n </animated.div>\n )}\n </Content>\n </StyledDiv>\n );\n }\n\n render() {\n const {\n destroyed = false,\n onClickOutside = () => null,\n placement = 'bottom-start',\n modifiers = {},\n referenceNode,\n usePortal = true,\n } = this.props;\n return (\n <DSOverlay isOpen={!destroyed} onClickOutside={onClickOutside} usePortal={usePortal}>\n <Popper modifiers={modifiers} placement={placement} referenceElement={referenceNode}>\n {this.renderContent}\n </Popper>\n </DSOverlay>\n );\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8Cf;AA7CR,mBAAqC;AACrC,uBAAuB;AACvB,0BAAuB;AACvB,yBAAoC;AACpC,mCAAkC;AAClC,wBAAsB;AACtB,kCAAqC;AAErC,MAAM,UAAU,6BAAU,OAAO,CAAC,CAAC;AACn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AET,UAAM,gBAAgB;AAAA,MACpB,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,kBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,eAAY;AAAA,QACZ;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,QAAM;AAAA,YACN,QAAQ,KAAK;AAAA,YACb,OAAO,WAAW,CAAC,mBAAmB,CAAC,oBAAoB,SAAS;AAAA,YACpE,QAAQ;AAAA,cACN,MAAM;AAAA,gBACJ,GAAG;AAAA,gBACH,MAAM,qBAAqB;AAAA,cAC7B;AAAA,cACA,OAAO;AAAA,YACT;AAAA,YAEC,WAAC,mBACA,4CAAC,4BAAS,KAAT,EAAa,KAAU,OAAO,gBAC5B,2CAAAA,SAAsB,kBAAkB,EAAE,eAAe,GAAG,CAAC,KAAK,YAAY,YAAY,SAAS,CAAC,CAAC,GACxG;AAAA;AAAA,QAEJ;AAAA;AAAA,IACF;AAAA,EAEJ;AAAA,EAEA,SAAS;AACP,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,iBAAiB,MAAM;AAAA,MACvB,YAAY;AAAA,MACZ,YAAY,CAAC;AAAA,MACb;AAAA,MACA,YAAY;AAAA,IACd,IAAI,KAAK;AACT,WACE,4CAAC,kBAAAC,SAAA,EAAU,QAAQ,CAAC,WAAW,gBAAgC,WAC7D,sDAAC,8BAAO,WAAsB,WAAsB,kBAAkB,eACnE,eAAK,eACR,GACF;AAAA,EAEJ;AACF;AAlHqB,cAEZ,eAAe,EAAE,oBAAoB,MAAM,KAAK;",
6
6
  "names": ["getComponentFromProps", "DSOverlay"]
7
7
  }
@@ -38,7 +38,7 @@ class PopperContent extends PureComponent {
38
38
  ...style,
39
39
  ...getArrowStylesBySize(placement, 25)
40
40
  },
41
- children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 30 30", children: [
41
+ children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 30 30", style: { verticalAlign: "initial" }, children: [
42
42
  /* @__PURE__ */ jsx(
43
43
  "path",
44
44
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/PopperContent.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Popper } from '@elliemae/react-popper';\nimport { Keyframes, animated } from 'react-spring/renderprops';\nimport getComponentFromProps from '@elliemae/ds-utilities/getComponentFromProps';\nimport DSOverlay from '@elliemae/ds-overlay';\nimport { getArrowStylesBySize } from './getArrowStylesBySize';\n\nconst Content = Keyframes.Spring({});\nconst StyledDiv = styled.div`\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport default class PopperContent extends PureComponent {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = { onContentDestroyed: () => null };\n\n constructor(props) {\n super(props);\n this.renderContent = this.renderContent.bind(this);\n this.renderArrow = this.renderArrow.bind(this);\n this.handleRestAnimation = this.handleRestAnimation.bind(this);\n }\n\n handleRestAnimation() {\n const { isOpen, onContentDestroyed } = this.props;\n if (!isOpen) {\n onContentDestroyed();\n }\n }\n\n renderArrow({ ref, style }, placement) {\n const { blockName, showArrow } = this.props;\n if (!showArrow) return null;\n return (\n <div\n key=\"popper-arrow\"\n ref={ref}\n className={`${blockName || 'popper'}__arrow`}\n data-placement={placement}\n style={{\n ...style,\n ...getArrowStylesBySize(placement, 25),\n }}\n >\n <svg viewBox=\"0 0 30 30\">\n <path\n className=\"stroke\"\n d=\"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26\n C26.7,29,24.6,28.1,23.7,27.1z\"\n />\n <path\n className=\"fill\"\n d=\"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z\"\n />\n </svg>\n </div>\n );\n }\n\n renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries }) {\n const {\n contentComponent,\n contentStyle,\n isOpen,\n closeAnimationConfig,\n openAnimationConfig,\n onMouseEnter,\n onMouseLeave,\n containerProps,\n zIndex,\n hideIfNotVisible,\n } = this.props;\n\n const computedStyle = {\n ...style,\n ...contentStyle,\n };\n return (\n <StyledDiv\n {...containerProps}\n data-placement={placement}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n style={computedStyle}\n data-testid=\"popper-container\"\n zIndex={zIndex}\n >\n <Content\n native\n onRest={this.handleRestAnimation}\n state={isOpen && (!outOfBoundaries || !hideIfNotVisible) ? 'open' : 'close'}\n states={{\n open: {\n ...openAnimationConfig,\n from: closeAnimationConfig.to,\n },\n close: closeAnimationConfig,\n }}\n >\n {(animationStyle) => (\n <animated.div ref={ref} style={animationStyle}>\n {getComponentFromProps(contentComponent, { scheduleUpdate }, [this.renderArrow(arrowProps, placement)])}\n </animated.div>\n )}\n </Content>\n </StyledDiv>\n );\n }\n\n render() {\n const {\n destroyed = false,\n onClickOutside = () => null,\n placement = 'bottom-start',\n modifiers = {},\n referenceNode,\n usePortal = true,\n } = this.props;\n return (\n <DSOverlay isOpen={!destroyed} onClickOutside={onClickOutside} usePortal={usePortal}>\n <Popper modifiers={modifiers} placement={placement} referenceElement={referenceNode}>\n {this.renderContent}\n </Popper>\n </DSOverlay>\n );\n }\n}\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC8Cf,SACE,KADF;AA7CR,SAAgB,qBAAqB;AACrC,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,WAAW,gBAAgB;AACpC,OAAO,2BAA2B;AAClC,OAAO,eAAe;AACtB,SAAS,4BAA4B;AAErC,MAAM,UAAU,UAAU,OAA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B;AAAA,MACpB,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,kBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,eAAY;AAAA,QACZ;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,QAAM;AAAA,YACN,QAAQ,KAAK;AAAA,YACb,OAAO,WAAW,CAAC,mBAAmB,CAAC,oBAAoB,SAAS;AAAA,YACpE,QAAQ;AAAA,cACN,MAAM;AAAA,gBACJ,GAAG;AAAA,gBACH,MAAM,qBAAqB;AAAA,cAC7B;AAAA,cACA,OAAO;AAAA,YACT;AAAA,YAEC,WAAC,mBACA,oBAAC,SAAS,KAAT,EAAa,KAAU,OAAO,gBAC5B,gCAAsB,kBAAkB,EAAE,eAAe,GAAG,CAAC,KAAK,YAAY,YAAY,SAAS,CAAC,CAAC,GACxG;AAAA;AAAA,QAEJ;AAAA;AAAA,IACF;AAAA,EAEJ;AAAA,EAEA,SAAS;AACP,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,iBAAiB,MAAM;AAAA,MACvB,YAAY;AAAA,MACZ,YAAY,CAAC;AAAA,MACb;AAAA,MACA,YAAY;AAAA,IACd,IAAI,KAAK;AACT,WACE,oBAAC,aAAU,QAAQ,CAAC,WAAW,gBAAgC,WAC7D,8BAAC,UAAO,WAAsB,WAAsB,kBAAkB,eACnE,eAAK,eACR,GACF;AAAA,EAEJ;AACF;AAlHqB,cAEZ,eAAe,EAAE,oBAAoB,MAAM,KAAK;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { PureComponent } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { Popper } from '@elliemae/react-popper';\nimport { Keyframes, animated } from 'react-spring/renderprops';\nimport getComponentFromProps from '@elliemae/ds-utilities/getComponentFromProps';\nimport DSOverlay from '@elliemae/ds-overlay';\nimport { getArrowStylesBySize } from './getArrowStylesBySize';\n\nconst Content = Keyframes.Spring({});\nconst StyledDiv = styled.div`\n z-index: ${({ zIndex, theme }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport default class PopperContent extends PureComponent {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = { onContentDestroyed: () => null };\n\n constructor(props) {\n super(props);\n this.renderContent = this.renderContent.bind(this);\n this.renderArrow = this.renderArrow.bind(this);\n this.handleRestAnimation = this.handleRestAnimation.bind(this);\n }\n\n handleRestAnimation() {\n const { isOpen, onContentDestroyed } = this.props;\n if (!isOpen) {\n onContentDestroyed();\n }\n }\n\n renderArrow({ ref, style }, placement) {\n const { blockName, showArrow } = this.props;\n if (!showArrow) return null;\n return (\n <div\n key=\"popper-arrow\"\n ref={ref}\n className={`${blockName || 'popper'}__arrow`}\n data-placement={placement}\n style={{\n ...style,\n ...getArrowStylesBySize(placement, 25),\n }}\n >\n <svg viewBox=\"0 0 30 30\" style={{ verticalAlign: 'initial' }}>\n <path\n className=\"stroke\"\n d=\"M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26\n C26.7,29,24.6,28.1,23.7,27.1z\"\n />\n <path\n className=\"fill\"\n d=\"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z\"\n />\n </svg>\n </div>\n );\n }\n\n renderContent({ ref, style, placement, arrowProps, scheduleUpdate, outOfBoundaries }) {\n const {\n contentComponent,\n contentStyle,\n isOpen,\n closeAnimationConfig,\n openAnimationConfig,\n onMouseEnter,\n onMouseLeave,\n containerProps,\n zIndex,\n hideIfNotVisible,\n } = this.props;\n\n const computedStyle = {\n ...style,\n ...contentStyle,\n };\n return (\n <StyledDiv\n {...containerProps}\n data-placement={placement}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n style={computedStyle}\n data-testid=\"popper-container\"\n zIndex={zIndex}\n >\n <Content\n native\n onRest={this.handleRestAnimation}\n state={isOpen && (!outOfBoundaries || !hideIfNotVisible) ? 'open' : 'close'}\n states={{\n open: {\n ...openAnimationConfig,\n from: closeAnimationConfig.to,\n },\n close: closeAnimationConfig,\n }}\n >\n {(animationStyle) => (\n <animated.div ref={ref} style={animationStyle}>\n {getComponentFromProps(contentComponent, { scheduleUpdate }, [this.renderArrow(arrowProps, placement)])}\n </animated.div>\n )}\n </Content>\n </StyledDiv>\n );\n }\n\n render() {\n const {\n destroyed = false,\n onClickOutside = () => null,\n placement = 'bottom-start',\n modifiers = {},\n referenceNode,\n usePortal = true,\n } = this.props;\n return (\n <DSOverlay isOpen={!destroyed} onClickOutside={onClickOutside} usePortal={usePortal}>\n <Popper modifiers={modifiers} placement={placement} referenceElement={referenceNode}>\n {this.renderContent}\n </Popper>\n </DSOverlay>\n );\n }\n}\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC8Cf,SACE,KADF;AA7CR,SAAgB,qBAAqB;AACrC,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,WAAW,gBAAgB;AACpC,OAAO,2BAA2B;AAClC,OAAO,eAAe;AACtB,SAAS,4BAA4B;AAErC,MAAM,UAAU,UAAU,OAAO,CAAC,CAAC;AACnC,MAAM,YAAY,OAAO;AAAA,aACZ,CAAC,EAAE,QAAQ,MAAM,MAAM,UAAU,MAAM,OAAO;AAAA;AAG3D,MAAO,sBAAoC,cAAc;AAAA,EAIvD,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,gBAAgB,KAAK,cAAc,KAAK,IAAI;AACjD,SAAK,cAAc,KAAK,YAAY,KAAK,IAAI;AAC7C,SAAK,sBAAsB,KAAK,oBAAoB,KAAK,IAAI;AAAA,EAC/D;AAAA,EAEA,sBAAsB;AACpB,UAAM,EAAE,QAAQ,mBAAmB,IAAI,KAAK;AAC5C,QAAI,CAAC,QAAQ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qBAAqB;AAAA,cAC7B;AAAA,cACA,OAAO;AAAA,YACT;AAAA,YAEC,WAAC,mBACA,oBAAC,SAAS,KAAT,EAAa,KAAU,OAAO,gBAC5B,gCAAsB,kBAAkB,EAAE,eAAe,GAAG,CAAC,KAAK,YAAY,YAAY,SAAS,CAAC,CAAC,GACxG;AAAA;AAAA,QAEJ;AAAA;AAAA,IACF;AAAA,EAEJ;AAAA,EAEA,SAAS;AACP,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,iBAAiB,MAAM;AAAA,MACvB,YAAY;AAAA,MACZ,YAAY,CAAC;AAAA,MACb;AAAA,MACA,YAAY;AAAA,IACd,IAAI,KAAK;AACT,WACE,oBAAC,aAAU,QAAQ,CAAC,WAAW,gBAAgC,WAC7D,8BAAC,UAAO,WAAsB,WAAsB,kBAAkB,eACnE,eAAK,eACR,GACF;AAAA,EAEJ;AACF;AAlHqB,cAEZ,eAAe,EAAE,oBAAoB,MAAM,KAAK;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-popper",
3
- "version": "3.14.0-next.4",
3
+ "version": "3.14.0-next.5",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper",
6
6
  "files": [
@@ -67,9 +67,9 @@
67
67
  "memoize-one": "~6.0.0",
68
68
  "react-spring": "~8.0.27",
69
69
  "styled-components": "~5.3.6",
70
- "@elliemae/ds-overlay": "3.14.0-next.4",
71
- "@elliemae/ds-system": "3.14.0-next.4",
72
- "@elliemae/ds-utilities": "3.14.0-next.4"
70
+ "@elliemae/ds-overlay": "3.14.0-next.5",
71
+ "@elliemae/ds-utilities": "3.14.0-next.5",
72
+ "@elliemae/ds-system": "3.14.0-next.5"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "react": "^17.0.2",