@elliemae/ds-popperjs 3.25.0-next.1 → 3.25.0-next.3

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.
@@ -79,7 +79,7 @@ const PopoverArrow = ({ placement, style, arrowElementRef }) => /* @__PURE__ */
79
79
  {
80
80
  "data-placement": placement,
81
81
  style,
82
- ref: arrowElementRef,
82
+ innerRef: arrowElementRef,
83
83
  "data-testid": "ds-tooltip-arrow",
84
84
  "aria-hidden": "true",
85
85
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 30 30", children: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/PopoverArrow.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\ninterface PopoverArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div<{ 'data-placement': string }>`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: neutral-500;\n fill-opacity: 0.4;\n }\n & .fill {\n fill: neutral-000;\n }\n\n &[data-placement^='top'] {\n svg {\n transform: rotateZ(180deg);\n }\n bottom: -${arrowHeight}px;\n }\n &[data-placement^='right'] {\n svg {\n transform: rotateZ(-90deg);\n }\n left: -${arrowWidth}px;\n }\n &[data-placement^='bottom'] {\n top: -${arrowHeight}px;\n }\n &[data-placement^='left'] {\n svg {\n transform: rotateZ(90deg);\n }\n right: -${arrowWidth}px;\n }\n margin-left: ${(props) =>\n props['data-placement'].startsWith('top') || props['data-placement'].startsWith('bottom')\n ? `-${arrowWidth / 2}px;`\n : '0;'};\n margin-top: ${(props) =>\n props['data-placement'].startsWith('left') || props['data-placement'].startsWith('right')\n ? `-${arrowHeight / 2}px;`\n : '0;'};\n`;\n\nexport const PopoverArrow = ({ placement, style, arrowElementRef }: PopoverArrowT): React.ReactElement => (\n <StyledArrow\n key=\"popper-arrow\"\n data-placement={placement}\n style={style}\n ref={arrowElementRef}\n data-testid=\"ds-tooltip-arrow\"\n aria-hidden=\"true\"\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 </StyledArrow>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgEnB;AA/DJ,uBAAuB;AAMvB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,wBAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAeG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,gBAAgB,EAAE,WAAW,KAAK,KAAK,MAAM,gBAAgB,EAAE,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,gBAAgB,EAAE,WAAW,MAAM,KAAK,MAAM,gBAAgB,EAAE,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAC/D;AAAA,EAAC;AAAA;AAAA,IAEC,kBAAgB;AAAA,IAChB;AAAA,IACA,KAAK;AAAA,IACL,eAAY;AAAA,IACZ,eAAY;AAAA,IAEZ,uDAAC,SAAI,SAAQ,aACX;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MAEJ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MACJ;AAAA,OACF;AAAA;AAAA,EAjBI;AAkBN;",
4
+ "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\ninterface PopoverArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div<{ 'data-placement': string }>`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: neutral-500;\n fill-opacity: 0.4;\n }\n & .fill {\n fill: neutral-000;\n }\n\n &[data-placement^='top'] {\n svg {\n transform: rotateZ(180deg);\n }\n bottom: -${arrowHeight}px;\n }\n &[data-placement^='right'] {\n svg {\n transform: rotateZ(-90deg);\n }\n left: -${arrowWidth}px;\n }\n &[data-placement^='bottom'] {\n top: -${arrowHeight}px;\n }\n &[data-placement^='left'] {\n svg {\n transform: rotateZ(90deg);\n }\n right: -${arrowWidth}px;\n }\n margin-left: ${(props) =>\n props['data-placement'].startsWith('top') || props['data-placement'].startsWith('bottom')\n ? `-${arrowWidth / 2}px;`\n : '0;'};\n margin-top: ${(props) =>\n props['data-placement'].startsWith('left') || props['data-placement'].startsWith('right')\n ? `-${arrowHeight / 2}px;`\n : '0;'};\n`;\n\nexport const PopoverArrow = ({ placement, style, arrowElementRef }: PopoverArrowT): React.ReactElement => (\n <StyledArrow\n key=\"popper-arrow\"\n data-placement={placement}\n style={style}\n innerRef={arrowElementRef}\n data-testid=\"ds-tooltip-arrow\"\n aria-hidden=\"true\"\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 </StyledArrow>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgEnB;AA/DJ,uBAAuB;AAMvB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,wBAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAeG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,gBAAgB,EAAE,WAAW,KAAK,KAAK,MAAM,gBAAgB,EAAE,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,gBAAgB,EAAE,WAAW,MAAM,KAAK,MAAM,gBAAgB,EAAE,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAC/D;AAAA,EAAC;AAAA;AAAA,IAEC,kBAAgB;AAAA,IAChB;AAAA,IACA,UAAU;AAAA,IACV,eAAY;AAAA,IACZ,eAAY;AAAA,IAEZ,uDAAC,SAAI,SAAQ,aACX;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MAEJ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MACJ;AAAA,OACF;AAAA;AAAA,EAjBI;AAkBN;",
6
6
  "names": []
7
7
  }
@@ -77,9 +77,9 @@ const PopoverContent = ({
77
77
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
78
  import_styled.StyledPopoverContentWrapper,
79
79
  {
80
+ innerRef: setPopperElement,
80
81
  role: "region",
81
82
  "aria-label": "popover menu",
82
- ref: setPopperElement,
83
83
  style: popperStyles,
84
84
  ...popperAttributes,
85
85
  ...globalAttrs,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/PopoverContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n role=\"region\"\n aria-label=\"popover menu\"\n ref={setPopperElement}\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDb;AAlDV,mBAA4C;AAG5C,0BAA6B;AAC7B,oBAAkE;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,2BAAuB,0BAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,oBAAgB;AAAA,IACpB,MACE,4EACG;AAAA;AAAA,MACA,iBAAiB,QAChB,4EACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,4CAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,4CAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,KAAK;AAAA,MACL,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
4
+ "sourcesContent": ["import React, { useCallback, useMemo } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n innerRef={setPopperElement}\n role=\"region\"\n aria-label=\"popover menu\"\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDb;AAlDV,mBAA4C;AAG5C,0BAA6B;AAC7B,oBAAkE;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,2BAAuB,0BAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,oBAAgB;AAAA,IACpB,MACE,4EACG;AAAA;AAAA,MACA,iBAAiB,QAChB,4EACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,4CAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,4CAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -46,7 +46,7 @@ const PopoverArrow = ({ placement, style, arrowElementRef }) => /* @__PURE__ */
46
46
  {
47
47
  "data-placement": placement,
48
48
  style,
49
- ref: arrowElementRef,
49
+ innerRef: arrowElementRef,
50
50
  "data-testid": "ds-tooltip-arrow",
51
51
  "aria-hidden": "true",
52
52
  children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 30 30", children: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/PopoverArrow.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\ninterface PopoverArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div<{ 'data-placement': string }>`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: neutral-500;\n fill-opacity: 0.4;\n }\n & .fill {\n fill: neutral-000;\n }\n\n &[data-placement^='top'] {\n svg {\n transform: rotateZ(180deg);\n }\n bottom: -${arrowHeight}px;\n }\n &[data-placement^='right'] {\n svg {\n transform: rotateZ(-90deg);\n }\n left: -${arrowWidth}px;\n }\n &[data-placement^='bottom'] {\n top: -${arrowHeight}px;\n }\n &[data-placement^='left'] {\n svg {\n transform: rotateZ(90deg);\n }\n right: -${arrowWidth}px;\n }\n margin-left: ${(props) =>\n props['data-placement'].startsWith('top') || props['data-placement'].startsWith('bottom')\n ? `-${arrowWidth / 2}px;`\n : '0;'};\n margin-top: ${(props) =>\n props['data-placement'].startsWith('left') || props['data-placement'].startsWith('right')\n ? `-${arrowHeight / 2}px;`\n : '0;'};\n`;\n\nexport const PopoverArrow = ({ placement, style, arrowElementRef }: PopoverArrowT): React.ReactElement => (\n <StyledArrow\n key=\"popper-arrow\"\n data-placement={placement}\n style={style}\n ref={arrowElementRef}\n data-testid=\"ds-tooltip-arrow\"\n aria-hidden=\"true\"\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 </StyledArrow>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACgEnB,SACE,KADF;AA/DJ,SAAS,cAAc;AAMvB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,OAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAeG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,gBAAgB,EAAE,WAAW,KAAK,KAAK,MAAM,gBAAgB,EAAE,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,gBAAgB,EAAE,WAAW,MAAM,KAAK,MAAM,gBAAgB,EAAE,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAC/D;AAAA,EAAC;AAAA;AAAA,IAEC,kBAAgB;AAAA,IAChB;AAAA,IACA,KAAK;AAAA,IACL,eAAY;AAAA,IACZ,eAAY;AAAA,IAEZ,+BAAC,SAAI,SAAQ,aACX;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MAEJ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MACJ;AAAA,OACF;AAAA;AAAA,EAjBI;AAkBN;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\ninterface PopoverArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div<{ 'data-placement': string }>`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: neutral-500;\n fill-opacity: 0.4;\n }\n & .fill {\n fill: neutral-000;\n }\n\n &[data-placement^='top'] {\n svg {\n transform: rotateZ(180deg);\n }\n bottom: -${arrowHeight}px;\n }\n &[data-placement^='right'] {\n svg {\n transform: rotateZ(-90deg);\n }\n left: -${arrowWidth}px;\n }\n &[data-placement^='bottom'] {\n top: -${arrowHeight}px;\n }\n &[data-placement^='left'] {\n svg {\n transform: rotateZ(90deg);\n }\n right: -${arrowWidth}px;\n }\n margin-left: ${(props) =>\n props['data-placement'].startsWith('top') || props['data-placement'].startsWith('bottom')\n ? `-${arrowWidth / 2}px;`\n : '0;'};\n margin-top: ${(props) =>\n props['data-placement'].startsWith('left') || props['data-placement'].startsWith('right')\n ? `-${arrowHeight / 2}px;`\n : '0;'};\n`;\n\nexport const PopoverArrow = ({ placement, style, arrowElementRef }: PopoverArrowT): React.ReactElement => (\n <StyledArrow\n key=\"popper-arrow\"\n data-placement={placement}\n style={style}\n innerRef={arrowElementRef}\n data-testid=\"ds-tooltip-arrow\"\n aria-hidden=\"true\"\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 </StyledArrow>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgEnB,SACE,KADF;AA/DJ,SAAS,cAAc;AAMvB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,OAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAeG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,gBAAgB,EAAE,WAAW,KAAK,KAAK,MAAM,gBAAgB,EAAE,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,gBAAgB,EAAE,WAAW,MAAM,KAAK,MAAM,gBAAgB,EAAE,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAC/D;AAAA,EAAC;AAAA;AAAA,IAEC,kBAAgB;AAAA,IAChB;AAAA,IACA,UAAU;AAAA,IACV,eAAY;AAAA,IACZ,eAAY;AAAA,IAEZ,+BAAC,SAAI,SAAQ,aACX;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MAEJ;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA;AAAA,MACJ;AAAA,OACF;AAAA;AAAA,EAjBI;AAkBN;",
6
6
  "names": []
7
7
  }
@@ -44,9 +44,9 @@ const PopoverContent = ({
44
44
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
45
45
  StyledPopoverContentWrapper,
46
46
  {
47
+ innerRef: setPopperElement,
47
48
  role: "region",
48
49
  "aria-label": "popover menu",
49
- ref: setPopperElement,
50
50
  style: popperStyles,
51
51
  ...popperAttributes,
52
52
  ...globalAttrs,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/PopoverContent.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useMemo } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n role=\"region\"\n aria-label=\"popover menu\"\n ref={setPopperElement}\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACkDb,mBACE,KADF;AAlDV,SAAgB,aAAa,eAAe;AAG5C,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,4BAA4B;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,gBAAgB;AAAA,IACpB,MACE,iCACG;AAAA;AAAA,MACA,iBAAiB,QAChB,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,oBAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,oBAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,KAAK;AAAA,MACL,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useMemo } from 'react';\nimport type {} from '@elliemae/ds-utilities';\nimport type { GlobalAttributesT, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { PopoverArrow } from './PopoverArrow.js';\nimport { StyledPopoverContentWrapper, StyledAnimatedPopper } from './styled.js';\n\nexport interface PopoverContentPropsT {\n setPopperElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n popperStyles: React.CSSProperties;\n arrowStyle: React.CSSProperties;\n popperAttributes: Record<string, string> | undefined;\n children: ReactChildrenComplete;\n setArrowElement: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;\n withoutArrow: boolean;\n withoutAnimation: boolean;\n animationDuration: number;\n zIndex: number;\n showPopover: boolean;\n setIsAnimating: React.Dispatch<React.SetStateAction<boolean>>;\n globalAttrs: GlobalAttributesT;\n xStyledAttrs: XstyledProps;\n}\n\nexport const PopoverContent = ({\n setPopperElement,\n popperStyles,\n popperAttributes,\n children,\n showPopover,\n setArrowElement,\n setIsAnimating,\n arrowStyle,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n globalAttrs,\n xStyledAttrs,\n}: PopoverContentPropsT): JSX.Element => {\n const checkAnimationStatus = useCallback(() => {\n if (!showPopover && !withoutAnimation) {\n setIsAnimating(false);\n }\n }, [showPopover, withoutAnimation, setIsAnimating]);\n\n const popperContent = useMemo(\n () => (\n <>\n {children}\n {withoutArrow === false ? (\n <>\n <PopoverArrow\n arrowElementRef={setArrowElement}\n style={arrowStyle}\n placement={popperAttributes ? popperAttributes['data-popper-placement'] : 'bottom'}\n />\n <div ref={setArrowElement} style={arrowStyle} />\n </>\n ) : null}\n </>\n ),\n [children, withoutArrow, arrowStyle, popperAttributes, setArrowElement],\n );\n return (\n <div>\n <StyledPopoverContentWrapper\n innerRef={setPopperElement}\n role=\"region\"\n aria-label=\"popover menu\"\n style={popperStyles}\n {...popperAttributes}\n {...globalAttrs}\n {...xStyledAttrs}\n zIndex={zIndex}\n >\n <StyledAnimatedPopper\n showPopover={showPopover}\n animationDuration={animationDuration}\n withoutAnimation={withoutAnimation}\n onAnimationEnd={checkAnimationStatus}\n >\n {popperContent}\n </StyledAnimatedPopper>\n </StyledPopoverContentWrapper>\n </div>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACkDb,mBACE,KADF;AAlDV,SAAgB,aAAa,eAAe;AAG5C,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B,4BAA4B;AAmB3D,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyC;AACvC,QAAM,uBAAuB,YAAY,MAAM;AAC7C,QAAI,CAAC,eAAe,CAAC,kBAAkB;AACrC,qBAAe,KAAK;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,aAAa,kBAAkB,cAAc,CAAC;AAElD,QAAM,gBAAgB;AAAA,IACpB,MACE,iCACG;AAAA;AAAA,MACA,iBAAiB,QAChB,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB;AAAA,YACjB,OAAO;AAAA,YACP,WAAW,mBAAmB,iBAAiB,uBAAuB,IAAI;AAAA;AAAA,QAC5E;AAAA,QACA,oBAAC,SAAI,KAAK,iBAAiB,OAAO,YAAY;AAAA,SAChD,IACE;AAAA,OACN;AAAA,IAEF,CAAC,UAAU,cAAc,YAAY,kBAAkB,eAAe;AAAA,EACxE;AACA,SACE,oBAAC,SACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,MAAK;AAAA,MACL,cAAW;AAAA,MACX,OAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA,gBAAgB;AAAA,UAEf;AAAA;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -7,6 +7,6 @@ interface StyledAnimatedPopperPropsT {
7
7
  animationDuration: number;
8
8
  withoutAnimation: boolean;
9
9
  }
10
- export declare const StyledPopoverContentWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledContentWrapperPropsT & Omit<LayoutProps<import("@xstyled/system").Theme>, "zIndex"> & SpaceProps & SizingProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").OwnerInterface, never>;
11
- export declare const StyledAnimatedPopper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledAnimatedPopperPropsT & import("@elliemae/ds-system").OwnerInterface, never>;
10
+ export declare const StyledPopoverContentWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledContentWrapperPropsT & Omit<LayoutProps<import("@xstyled/system").Theme>, "zIndex"> & SpaceProps & SizingProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
11
+ export declare const StyledAnimatedPopper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledAnimatedPopperPropsT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
12
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-popperjs",
3
- "version": "3.25.0-next.1",
3
+ "version": "3.25.0-next.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper JS Wrapper",
6
6
  "files": [
@@ -74,14 +74,14 @@
74
74
  "@popperjs/core": "~2.11.7",
75
75
  "@xstyled/system": "~3.7.3",
76
76
  "react-popper": "~2.3.0",
77
- "@elliemae/ds-props-helpers": "3.25.0-next.1",
78
- "@elliemae/ds-utilities": "3.25.0-next.1",
79
- "@elliemae/ds-system": "3.25.0-next.1"
77
+ "@elliemae/ds-props-helpers": "3.25.0-next.3",
78
+ "@elliemae/ds-utilities": "3.25.0-next.3",
79
+ "@elliemae/ds-system": "3.25.0-next.3"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@elliemae/pui-cli": "~9.0.0-next.31",
83
83
  "styled-components": "~5.3.9",
84
- "@elliemae/ds-monorepo-devops": "3.25.0-next.1"
84
+ "@elliemae/ds-monorepo-devops": "3.25.0-next.3"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "react": "^17.0.2",