@elliemae/ds-popperjs 3.1.0-next.2 → 3.1.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.
@@ -25,10 +25,10 @@ __export(PopoverArrow_exports, {
25
25
  module.exports = __toCommonJS(PopoverArrow_exports);
26
26
  var React = __toESM(require("react"));
27
27
  var import_react = __toESM(require("react"));
28
- var import_styled_components = __toESM(require("styled-components"));
28
+ var import_ds_system = require("@elliemae/ds-system");
29
29
  const arrowWidth = 18;
30
30
  const arrowHeight = 18;
31
- const StyledArrow = import_styled_components.default.div`
31
+ const StyledArrow = import_ds_system.styled.div`
32
32
  position: absolute;
33
33
  width: ${arrowWidth}px;
34
34
  height: ${arrowHeight}px;
@@ -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 'styled-components';\ninterface PopoverArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n fill-opacity: 0.4;\n }\n & .fill {\n fill: ${({ theme }) => theme.colors.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 >\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;ADAvB,mBAAkB;AAClB,+BAAmB;AAMnB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,iCAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA,YAIA,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,YAIpC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,kBAAkB,WAAW,KAAK,KAAK,MAAM,kBAAkB,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,kBAAkB,WAAW,MAAM,KAAK,MAAM,kBAAkB,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,sBAC/C,mDAAC;AAAA,EACC,KAAI;AAAA,EACJ,kBAAgB;AAAA,EAChB;AAAA,EACA,KAAK;AAAA,EACL,eAAY;AAAA,GAEZ,mDAAC;AAAA,EAAI,SAAQ;AAAA,GACX,mDAAC;AAAA,EACC,WAAU;AAAA,EACV,GAAE;AAAA,CAEJ,GACA,mDAAC;AAAA,EACC,WAAU;AAAA,EACV,GAAE;AAAA,CACJ,CACF,CACF;",
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>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n fill-opacity: 0.4;\n }\n & .fill {\n fill: ${({ theme }) => theme.colors.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 >\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;ADAvB,mBAAkB;AAClB,uBAAuB;AAMvB,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,wBAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA,YAIA,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,YAIpC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,kBAAkB,WAAW,KAAK,KAAK,MAAM,kBAAkB,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,kBAAkB,WAAW,MAAM,KAAK,MAAM,kBAAkB,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,sBAC/C,mDAAC;AAAA,EACC,KAAI;AAAA,EACJ,kBAAgB;AAAA,EAChB;AAAA,EACA,KAAK;AAAA,EACL,eAAY;AAAA,GAEZ,mDAAC;AAAA,EAAI,SAAQ;AAAA,GACX,mDAAC;AAAA,EACC,WAAU;AAAA,EACV,GAAE;AAAA,CAEJ,GACA,mDAAC;AAAA,EACC,WAAU;AAAA,EACV,GAAE;AAAA,CACJ,CACF,CACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useConfiguredDefaultProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useConfiguredDefaultModifiers } from './useConfiguredDefaultModifiers';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst emptyObj = {};\n\nexport const useConfiguredDefaultProps = ({ props, arrowElement }) => {\n // don't move this out of the hook or `document.body` will explode\n const staticDefaultProps = useMemo(\n () => ({\n referenceElement: null,\n showPopover: false,\n closeContextMenu: noop,\n onClickOutside: noop,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n animationDuration: 100,\n portalDOMContainer: document.body,\n startPlacementPreference: 'top',\n placementOrderPreference: ['top', 'bottom', 'left', 'right'],\n extraPopperStyles: emptyObj,\n }),\n [],\n );\n const { modifiers: configuredModifiers } = useConfiguredDefaultModifiers({\n props,\n arrowElement,\n });\n\n const defaultProps = useMemo(\n () => ({ ...staticDefaultProps, modifiers: configuredModifiers }),\n [configuredModifiers, staticDefaultProps],\n );\n\n return defaultProps;\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import { useContext, useMemo } from 'react';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { useConfiguredDefaultModifiers } from './useConfiguredDefaultModifiers';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst emptyObj = {};\n\nexport const useConfiguredDefaultProps = ({ props, arrowElement }) => {\n // don't move this out of the hook or `document.body` will explode\n const staticDefaultProps = useMemo(\n () => ({\n referenceElement: null,\n showPopover: false,\n closeContextMenu: noop,\n onClickOutside: noop,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n animationDuration: 100,\n portalDOMContainer: document.body,\n startPlacementPreference: 'top',\n placementOrderPreference: ['top', 'bottom', 'left', 'right'],\n extraPopperStyles: emptyObj,\n }),\n [],\n );\n const { modifiers: configuredModifiers } = useConfiguredDefaultModifiers({\n props,\n arrowElement,\n });\n\n const defaultProps = useMemo(\n () => ({ ...staticDefaultProps, modifiers: configuredModifiers }),\n [configuredModifiers, staticDefaultProps],\n );\n\n return defaultProps;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AAEpC,2CAA8C;AAG9C,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,WAAW,CAAC;AAEX,MAAM,4BAA4B,CAAC,EAAE,OAAO,mBAAmB;AAEpE,QAAM,qBAAqB,0BACzB,MAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,0BAA0B,CAAC,OAAO,UAAU,QAAQ,OAAO;AAAA,IAC3D,mBAAmB;AAAA,EACrB,IACA,CAAC,CACH;AACA,QAAM,EAAE,WAAW,wBAAwB,wEAA8B;AAAA,IACvE;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,eAAe,0BACnB,MAAO,iCAAK,qBAAL,EAAyB,WAAW,oBAAoB,IAC/D,CAAC,qBAAqB,kBAAkB,CAC1C;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(src_exports);
42
42
  var React = __toESM(require("react"));
43
43
  var import_react = __toESM(require("react"));
44
44
  var import_react_dom = require("react-dom");
45
- var import_react_desc = require("react-desc");
45
+ var import_ds_utilities = require("@elliemae/ds-utilities");
46
46
  var import_propTypes = require("./propTypes");
47
47
  var import_PopoverContent = require("./PopoverContent");
48
48
  var import_useConfigDSPopperjs = require("./config/useConfigDSPopperjs");
@@ -103,7 +103,7 @@ const DSPopperJS = (props) => {
103
103
  };
104
104
  DSPopperJS.propTypes = import_propTypes.dspopperjsPropTypes;
105
105
  DSPopperJS.displayName = "DSPopperJS";
106
- const DSPopperJSWithSchema = (0, import_react_desc.describe)(DSPopperJS).description("A dimsum custom styling wrapper on top of popperjs");
106
+ const DSPopperJSWithSchema = (0, import_ds_utilities.describe)(DSPopperJS).description("A dimsum custom styling wrapper on top of popperjs");
107
107
  DSPopperJSWithSchema.propTypes = import_propTypes.dspopperjsPropTypes;
108
108
  var src_default = DSPopperJS;
109
109
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe } from 'react-desc';\nimport { dspopperjsPropTypes } from './propTypes';\nimport { PopoverContent } from './PopoverContent';\nimport { useConfigDSPopperjs } from './config/useConfigDSPopperjs';\nimport type { DSDSPopperjsPropsT } from './index.d';\n\nconst DSPopperJS = (props: DSDSPopperjsPropsT): JSX.Element => {\n const {\n props: {\n showPopover,\n withoutAnimation,\n animationDuration,\n withoutPortal,\n withoutArrow,\n portalDOMContainer,\n zIndex,\n extraPopperStyles,\n },\n setPopperElement,\n setArrowElement,\n setIsAnimating,\n popoverHelper,\n isAnimating,\n } = useConfigDSPopperjs(props);\n const { children } = props;\n const { styles, attributes } = popoverHelper;\n const contentJSX = useMemo(\n () => (\n <PopoverContent\n setPopperElement={setPopperElement}\n popperStyles={{ ...styles.popper, ...extraPopperStyles }}\n popperAttributes={attributes.popper}\n setArrowElement={setArrowElement}\n arrowStyle={styles.arrow}\n withoutArrow={withoutArrow}\n withoutAnimation={withoutAnimation}\n animationDuration={animationDuration}\n zIndex={zIndex}\n showPopover={showPopover}\n setIsAnimating={setIsAnimating}\n >\n {children}\n </PopoverContent>\n ),\n [\n attributes.popper,\n children,\n setIsAnimating,\n showPopover,\n extraPopperStyles,\n setArrowElement,\n setPopperElement,\n styles.arrow,\n styles.popper,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n ],\n );\n if (showPopover || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (withoutPortal === false) return <>{createPortal(<>{contentJSX}</>, portalDOMContainer)}</>;\n }\n return null;\n};\n\nDSPopperJS.propTypes = dspopperjsPropTypes;\nDSPopperJS.displayName = 'DSPopperJS';\nconst DSPopperJSWithSchema = describe(DSPopperJS).description('A dimsum custom styling wrapper on top of popperjs');\nDSPopperJSWithSchema.propTypes = dspopperjsPropTypes;\n\nexport { DSPopperJS, DSPopperJSWithSchema };\nexport default DSPopperJS;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+B;AAC/B,uBAA6B;AAC7B,wBAAyB;AACzB,uBAAoC;AACpC,4BAA+B;AAC/B,iCAAoC;AAGpC,MAAM,aAAa,CAAC,UAA2C;AAC7D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,oDAAoB,KAAK;AAC7B,QAAM,EAAE,aAAa;AACrB,QAAM,EAAE,QAAQ,eAAe;AAC/B,QAAM,aAAa,0BACjB,MACE,mDAAC;AAAA,IACC;AAAA,IACA,cAAc,kCAAK,OAAO,SAAW;AAAA,IACrC,kBAAkB,WAAW;AAAA,IAC7B;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC,QACH,GAEF;AAAA,IACE,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AACA,MAAI,eAAe,aAAa;AAC9B,QAAI,kBAAkB;AAAM,aAAO;AACnC,QAAI,kBAAkB;AAAO,aAAO,wFAAG,mCAAa,wFAAG,UAAW,GAAK,kBAAkB,CAAE;AAAA,EAC7F;AACA,SAAO;AACT;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,gCAAS,UAAU,EAAE,YAAY,oDAAoD;AAClH,qBAAqB,YAAY;AAGjC,IAAO,cAAQ;",
4
+ "sourcesContent": ["import React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe } from '@elliemae/ds-utilities';\nimport { dspopperjsPropTypes } from './propTypes';\nimport { PopoverContent } from './PopoverContent';\nimport { useConfigDSPopperjs } from './config/useConfigDSPopperjs';\nimport type { DSDSPopperjsPropsT } from './index.d';\n\nconst DSPopperJS = (props: DSDSPopperjsPropsT): JSX.Element => {\n const {\n props: {\n showPopover,\n withoutAnimation,\n animationDuration,\n withoutPortal,\n withoutArrow,\n portalDOMContainer,\n zIndex,\n extraPopperStyles,\n },\n setPopperElement,\n setArrowElement,\n setIsAnimating,\n popoverHelper,\n isAnimating,\n } = useConfigDSPopperjs(props);\n const { children } = props;\n const { styles, attributes } = popoverHelper;\n const contentJSX = useMemo(\n () => (\n <PopoverContent\n setPopperElement={setPopperElement}\n popperStyles={{ ...styles.popper, ...extraPopperStyles }}\n popperAttributes={attributes.popper}\n setArrowElement={setArrowElement}\n arrowStyle={styles.arrow}\n withoutArrow={withoutArrow}\n withoutAnimation={withoutAnimation}\n animationDuration={animationDuration}\n zIndex={zIndex}\n showPopover={showPopover}\n setIsAnimating={setIsAnimating}\n >\n {children}\n </PopoverContent>\n ),\n [\n attributes.popper,\n children,\n setIsAnimating,\n showPopover,\n extraPopperStyles,\n setArrowElement,\n setPopperElement,\n styles.arrow,\n styles.popper,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n ],\n );\n if (showPopover || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (withoutPortal === false) return <>{createPortal(<>{contentJSX}</>, portalDOMContainer)}</>;\n }\n return null;\n};\n\nDSPopperJS.propTypes = dspopperjsPropTypes;\nDSPopperJS.displayName = 'DSPopperJS';\nconst DSPopperJSWithSchema = describe(DSPopperJS).description('A dimsum custom styling wrapper on top of popperjs');\nDSPopperJSWithSchema.propTypes = dspopperjsPropTypes;\n\nexport { DSPopperJS, DSPopperJSWithSchema };\nexport default DSPopperJS;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA+B;AAC/B,uBAA6B;AAC7B,0BAAyB;AACzB,uBAAoC;AACpC,4BAA+B;AAC/B,iCAAoC;AAGpC,MAAM,aAAa,CAAC,UAA2C;AAC7D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,oDAAoB,KAAK;AAC7B,QAAM,EAAE,aAAa;AACrB,QAAM,EAAE,QAAQ,eAAe;AAC/B,QAAM,aAAa,0BACjB,MACE,mDAAC;AAAA,IACC;AAAA,IACA,cAAc,kCAAK,OAAO,SAAW;AAAA,IACrC,kBAAkB,WAAW;AAAA,IAC7B;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC,QACH,GAEF;AAAA,IACE,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AACA,MAAI,eAAe,aAAa;AAC9B,QAAI,kBAAkB;AAAM,aAAO;AACnC,QAAI,kBAAkB;AAAO,aAAO,wFAAG,mCAAa,wFAAG,UAAW,GAAK,kBAAkB,CAAE;AAAA,EAC7F;AACA,SAAO;AACT;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,kCAAS,UAAU,EAAE,YAAY,oDAAoD;AAClH,qBAAqB,YAAY;AAGjC,IAAO,cAAQ;",
6
6
  "names": []
7
7
  }
@@ -24,18 +24,18 @@ __export(propTypes_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(propTypes_exports);
26
26
  var React = __toESM(require("react"));
27
- var import_react_desc = require("react-desc");
27
+ var import_ds_utilities = require("@elliemae/ds-utilities");
28
28
  const dspopperjsPropTypes = {
29
- referenceElement: import_react_desc.PropTypes.element.description("popperjs DOM referenceElement").isRequired,
30
- showPopover: import_react_desc.PropTypes.bool.description("whether or not to show the popper content").isRequired,
31
- closeContextMenu: import_react_desc.PropTypes.func.description('Callback to close the context menu, used for "on click outside", if not provided click outside will not trigger anything').defaultValue("() => {}"),
32
- withoutPortal: import_react_desc.PropTypes.bool.description("Whether or not the popper content should appear in a DOM portal or not").defaultValue(true),
33
- withoutArrow: import_react_desc.PropTypes.bool.description("Whether or not the popper context menu should print the arrow").defaultValue(false),
34
- withoutAnimation: import_react_desc.PropTypes.bool.description("Whether or not the popper context menu should be animated").defaultValue(false),
35
- animationDuration: import_react_desc.PropTypes.number.description("Popper context menus Animation duration in ms").defaultValue(100),
36
- boundaryElement: import_react_desc.PropTypes.element.description('Bounding element to calculate upon, defaults to "clippingParents",which are the scrolling containers that may cause element to be partially or fully cut off').defaultValue(void 0),
37
- portalDOMContainer: import_react_desc.PropTypes.element.description("When using portal, the container in which to append the DOM content, defaults to document body").defaultValue(void 0),
38
- startPlacementPreference: import_react_desc.PropTypes.oneOf([
29
+ referenceElement: import_ds_utilities.PropTypes.element.description("popperjs DOM referenceElement").isRequired,
30
+ showPopover: import_ds_utilities.PropTypes.bool.description("whether or not to show the popper content").isRequired,
31
+ closeContextMenu: import_ds_utilities.PropTypes.func.description('Callback to close the context menu, used for "on click outside", if not provided click outside will not trigger anything').defaultValue("() => {}"),
32
+ withoutPortal: import_ds_utilities.PropTypes.bool.description("Whether or not the popper content should appear in a DOM portal or not").defaultValue(true),
33
+ withoutArrow: import_ds_utilities.PropTypes.bool.description("Whether or not the popper context menu should print the arrow").defaultValue(false),
34
+ withoutAnimation: import_ds_utilities.PropTypes.bool.description("Whether or not the popper context menu should be animated").defaultValue(false),
35
+ animationDuration: import_ds_utilities.PropTypes.number.description("Popper context menus Animation duration in ms").defaultValue(100),
36
+ boundaryElement: import_ds_utilities.PropTypes.element.description('Bounding element to calculate upon, defaults to "clippingParents",which are the scrolling containers that may cause element to be partially or fully cut off').defaultValue(void 0),
37
+ portalDOMContainer: import_ds_utilities.PropTypes.element.description("When using portal, the container in which to append the DOM content, defaults to document body").defaultValue(void 0),
38
+ startPlacementPreference: import_ds_utilities.PropTypes.oneOf([
39
39
  "top-start",
40
40
  "top",
41
41
  "top-end",
@@ -49,7 +49,7 @@ const dspopperjsPropTypes = {
49
49
  "left",
50
50
  "left-start"
51
51
  ]).description("start placement preferences, as per popperjs placement option").defaultValue("'top'"),
52
- placementOrderPreference: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOf([
52
+ placementOrderPreference: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.oneOf([
53
53
  "top-start",
54
54
  "top",
55
55
  "top-end",
@@ -63,11 +63,11 @@ const dspopperjsPropTypes = {
63
63
  "left",
64
64
  "left-start"
65
65
  ])).description('Array of placement preferences, as per popperjs "flip" placement option').defaultValue("['top', 'bottom', 'left', 'right']"),
66
- zIndex: import_react_desc.PropTypes.number.description("popperjs content z-index").defaultValue(1),
67
- customOffset: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.number).description("placement offset array").defaultValue(1),
68
- modifiers: import_react_desc.PropTypes.array.description("modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/").defaultValue(1),
69
- extraPopperStyles: import_react_desc.PropTypes.object.description("Extra object styles to attach to the popper element").defaultValue({}),
70
- onClickOutside: import_react_desc.PropTypes.func.description("Callback triggered when clicking outside the popper").defaultValue(() => null),
71
- children: import_react_desc.PropTypes.node.description("The content of the popper").defaultValue(void 0)
66
+ zIndex: import_ds_utilities.PropTypes.number.description("popperjs content z-index").defaultValue(1),
67
+ customOffset: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.number).description("placement offset array").defaultValue(1),
68
+ modifiers: import_ds_utilities.PropTypes.array.description("modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/").defaultValue(1),
69
+ extraPopperStyles: import_ds_utilities.PropTypes.object.description("Extra object styles to attach to the popper element").defaultValue({}),
70
+ onClickOutside: import_ds_utilities.PropTypes.func.description("Callback triggered when clicking outside the popper").defaultValue(() => null),
71
+ children: import_ds_utilities.PropTypes.node.description("The content of the popper").defaultValue(void 0)
72
72
  };
73
73
  //# sourceMappingURL=propTypes.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { PropTypes } from 'react-desc';\n\nexport const dspopperjsPropTypes = {\n /**\n * React ref to popperjs referenceElement\n */\n referenceElement: PropTypes.element.description('popperjs DOM referenceElement').isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\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 /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.element\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: 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('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\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 )\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue(1),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array\n .description('modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n children: PropTypes.node.description('The content of the popper').defaultValue(undefined),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,sBAAsB;AAAA,EAIjC,kBAAkB,4BAAU,QAAQ,YAAY,+BAA+B,EAAE;AAAA,EAIjF,aAAa,4BAAU,KAAK,YAAY,2CAA2C,EAAE;AAAA,EAKrF,kBAAkB,4BAAU,KACzB,YACC,0HAEF,EACC,aAAa,UAAU;AAAA,EAI1B,eAAe,4BAAU,KACtB,YAAY,wEAAwE,EACpF,aAAa,IAAI;AAAA,EAIpB,cAAc,4BAAU,KACrB,YAAY,+DAA+D,EAC3E,aAAa,KAAK;AAAA,EAIrB,kBAAkB,4BAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EAIrB,mBAAmB,4BAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EAKjH,iBAAiB,4BAAU,QACxB,YACC,8JAEF,EACC,aAAa,MAAS;AAAA,EAIzB,oBAAoB,4BAAU,QAC3B,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EAIzB,0BAA0B,4BAAU,MAAM;AAAA,IACxC;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,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EAIvB,0BAA0B,4BAAU,QAClC,4BAAU,MAAM;AAAA,IACd;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,CACH,EACG,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EAIpD,QAAQ,4BAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAI/E,cAAc,4BAAU,QAAQ,4BAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC;AAAA,EAKtG,WAAW,4BAAU,MAClB,YAAY,8FAA8F,EAC1G,aAAa,CAAC;AAAA,EACjB,mBAAmB,4BAAU,OAC1B,YAAY,qDAAqD,EACjE,aAAa,CAAC,CAAC;AAAA,EAClB,gBAAgB,4BAAU,KACvB,YAAY,qDAAqD,EACjE,aAAa,MAAM,IAAI;AAAA,EAC1B,UAAU,4BAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,MAAS;AAC1F;",
4
+ "sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const dspopperjsPropTypes = {\n /**\n * React ref to popperjs referenceElement\n */\n referenceElement: PropTypes.element.description('popperjs DOM referenceElement').isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\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 /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.element\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: 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('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\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 )\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue(1),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array\n .description('modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n children: PropTypes.node.description('The content of the popper').defaultValue(undefined),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,sBAAsB;AAAA,EAIjC,kBAAkB,8BAAU,QAAQ,YAAY,+BAA+B,EAAE;AAAA,EAIjF,aAAa,8BAAU,KAAK,YAAY,2CAA2C,EAAE;AAAA,EAKrF,kBAAkB,8BAAU,KACzB,YACC,0HAEF,EACC,aAAa,UAAU;AAAA,EAI1B,eAAe,8BAAU,KACtB,YAAY,wEAAwE,EACpF,aAAa,IAAI;AAAA,EAIpB,cAAc,8BAAU,KACrB,YAAY,+DAA+D,EAC3E,aAAa,KAAK;AAAA,EAIrB,kBAAkB,8BAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EAIrB,mBAAmB,8BAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EAKjH,iBAAiB,8BAAU,QACxB,YACC,8JAEF,EACC,aAAa,MAAS;AAAA,EAIzB,oBAAoB,8BAAU,QAC3B,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EAIzB,0BAA0B,8BAAU,MAAM;AAAA,IACxC;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,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EAIvB,0BAA0B,8BAAU,QAClC,8BAAU,MAAM;AAAA,IACd;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,CACH,EACG,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EAIpD,QAAQ,8BAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAI/E,cAAc,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC;AAAA,EAKtG,WAAW,8BAAU,MAClB,YAAY,8FAA8F,EAC1G,aAAa,CAAC;AAAA,EACjB,mBAAmB,8BAAU,OAC1B,YAAY,qDAAqD,EACjE,aAAa,CAAC,CAAC;AAAA,EAClB,gBAAgB,8BAAU,KACvB,YAAY,qDAAqD,EACjE,aAAa,MAAM,IAAI;AAAA,EAC1B,UAAU,8BAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,MAAS;AAC1F;",
6
6
  "names": []
7
7
  }
@@ -25,9 +25,9 @@ __export(styled_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(styled_exports);
27
27
  var React = __toESM(require("react"));
28
- var import_styled_components = __toESM(require("styled-components"));
29
28
  var import_ds_system = require("@elliemae/ds-system");
30
- const showAnimation = import_ds_system.kfrm`
29
+ var import_ds_system2 = require("@elliemae/ds-system");
30
+ const showAnimation = import_ds_system2.kfrm`
31
31
  from {
32
32
  opacity: 0;
33
33
  transform: scale(0.8);
@@ -39,7 +39,7 @@ const showAnimation = import_ds_system.kfrm`
39
39
  visibility: visible;
40
40
  }
41
41
  `;
42
- const hideAnimation = import_ds_system.kfrm`
42
+ const hideAnimation = import_ds_system2.kfrm`
43
43
  from {
44
44
  opacity: 1;
45
45
  transform: scale(1);
@@ -51,13 +51,13 @@ const hideAnimation = import_ds_system.kfrm`
51
51
  visibility: hidden;
52
52
  }
53
53
  `;
54
- const StyledPopoverContentWrapper = import_styled_components.default.div`
54
+ const StyledPopoverContentWrapper = import_ds_system.styled.div`
55
55
  z-index: ${({ theme, zIndex }) => zIndex ?? theme.zIndex.popper};
56
56
  `;
57
- const StyledAnimatedPopper = import_styled_components.default.div`
57
+ const StyledAnimatedPopper = import_ds_system.styled.div`
58
58
  box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 2px 4px rgba(16, 22, 26, 0.2), 0 8px 24px rgba(16, 22, 26, 0.2);
59
59
 
60
- ${({ showPopover, animationDuration, withoutAnimation }) => !withoutAnimation && import_ds_system.css`
60
+ ${({ showPopover, animationDuration, withoutAnimation }) => !withoutAnimation && import_ds_system2.css`
61
61
  animation: ${showPopover ? showAnimation : hideAnimation} ${animationDuration}ms ease-in;
62
62
  `}
63
63
  `;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/styled.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import styled from 'styled-components';\nimport { kfrm, css } from '@elliemae/ds-system';\n\ninterface StyledContentWrapperPropsT {\n zIndex: number;\n}\n\ninterface StyledAnimatedPopperPropsT {\n showPopover: boolean;\n animationDuration: number;\n withoutAnimation: boolean;\n}\n\nconst showAnimation = kfrm`\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n`;\n\nconst hideAnimation = kfrm`\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0.8);\n visibility: hidden;\n }\n`;\n\nexport const StyledPopoverContentWrapper = styled.div<StyledContentWrapperPropsT>`\n z-index: ${({ theme, zIndex }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport const StyledAnimatedPopper = styled.div<StyledAnimatedPopperPropsT>`\n box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 2px 4px rgba(16, 22, 26, 0.2), 0 8px 24px rgba(16, 22, 26, 0.2);\n\n ${({ showPopover, animationDuration, withoutAnimation }) =>\n !withoutAnimation &&\n css`\n animation: ${showPopover ? showAnimation : hideAnimation} ${animationDuration}ms ease-in;\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,uBAA0B;AAY1B,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAatB,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaf,MAAM,8BAA8B,iCAAO;AAAA,aACrC,CAAC,EAAE,OAAO,aAAa,UAAU,MAAM,OAAO;AAAA;AAGpD,MAAM,uBAAuB,iCAAO;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,aAAa,mBAAmB,uBACnC,CAAC,oBACD;AAAA,mBACe,cAAc,gBAAgB,iBAAiB;AAAA;AAAA;",
4
+ "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { kfrm, css } from '@elliemae/ds-system';\n\ninterface StyledContentWrapperPropsT {\n zIndex: number;\n}\n\ninterface StyledAnimatedPopperPropsT {\n showPopover: boolean;\n animationDuration: number;\n withoutAnimation: boolean;\n}\n\nconst showAnimation = kfrm`\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n`;\n\nconst hideAnimation = kfrm`\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0.8);\n visibility: hidden;\n }\n`;\n\nexport const StyledPopoverContentWrapper = styled.div<StyledContentWrapperPropsT>`\n z-index: ${({ theme, zIndex }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport const StyledAnimatedPopper = styled.div<StyledAnimatedPopperPropsT>`\n box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 2px 4px rgba(16, 22, 26, 0.2), 0 8px 24px rgba(16, 22, 26, 0.2);\n\n ${({ showPopover, animationDuration, withoutAnimation }) =>\n !withoutAnimation &&\n css`\n animation: ${showPopover ? showAnimation : hideAnimation} ${animationDuration}ms ease-in;\n `}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,wBAA0B;AAY1B,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAatB,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaf,MAAM,8BAA8B,wBAAO;AAAA,aACrC,CAAC,EAAE,OAAO,aAAa,UAAU,MAAM,OAAO;AAAA;AAGpD,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,aAAa,mBAAmB,uBACnC,CAAC,oBACD;AAAA,mBACe,cAAc,gBAAgB,iBAAiB;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import styled from "styled-components";
3
+ import { styled } from "@elliemae/ds-system";
4
4
  const arrowWidth = 18;
5
5
  const arrowHeight = 18;
6
6
  const StyledArrow = styled.div`
@@ -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 'styled-components';\ninterface PopoverArrowT {\n placement: string;\n style: React.CSSProperties;\n arrowElementRef: React.Dispatch<React.SetStateAction<HTMLDivElement>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n fill-opacity: 0.4;\n }\n & .fill {\n fill: ${({ theme }) => theme.colors.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 >\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"],
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>>;\n}\nconst arrowWidth = 18;\nconst arrowHeight = 18;\n\nconst StyledArrow = styled.div`\n position: absolute;\n width: ${arrowWidth}px;\n height: ${arrowHeight}px;\n pointer-events: none;\n background-color: transparent;\n & .stroke {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n fill-opacity: 0.4;\n }\n & .fill {\n fill: ${({ theme }) => theme.colors.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 >\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
5
  "mappings": "AAAA;ACAA;AACA;AAMA,MAAM,aAAa;AACnB,MAAM,cAAc;AAEpB,MAAM,cAAc,OAAO;AAAA;AAAA,WAEhB;AAAA,YACC;AAAA;AAAA;AAAA;AAAA,YAIA,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,YAIpC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMF;AAAA;AAAA;AAAA,YAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAME;AAAA;AAAA,iBAEG,CAAC,UACd,MAAM,kBAAkB,WAAW,KAAK,KAAK,MAAM,kBAAkB,WAAW,QAAQ,IACpF,IAAI,aAAa,SACjB;AAAA,gBACQ,CAAC,UACb,MAAM,kBAAkB,WAAW,MAAM,KAAK,MAAM,kBAAkB,WAAW,OAAO,IACpF,IAAI,cAAc,SAClB;AAAA;AAGD,MAAM,eAAe,CAAC,EAAE,WAAW,OAAO,sBAC/C,qCAAC;AAAA,EACC,KAAI;AAAA,EACJ,kBAAgB;AAAA,EAChB;AAAA,EACA,KAAK;AAAA,EACL,eAAY;AAAA,GAEZ,qCAAC;AAAA,EAAI,SAAQ;AAAA,GACX,qCAAC;AAAA,EACC,WAAU;AAAA,EACV,GAAE;AAAA,CAEJ,GACA,qCAAC;AAAA,EACC,WAAU;AAAA,EACV,GAAE;AAAA,CACJ,CACF,CACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useConfiguredDefaultProps.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useConfiguredDefaultModifiers } from './useConfiguredDefaultModifiers';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst emptyObj = {};\n\nexport const useConfiguredDefaultProps = ({ props, arrowElement }) => {\n // don't move this out of the hook or `document.body` will explode\n const staticDefaultProps = useMemo(\n () => ({\n referenceElement: null,\n showPopover: false,\n closeContextMenu: noop,\n onClickOutside: noop,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n animationDuration: 100,\n portalDOMContainer: document.body,\n startPlacementPreference: 'top',\n placementOrderPreference: ['top', 'bottom', 'left', 'right'],\n extraPopperStyles: emptyObj,\n }),\n [],\n );\n const { modifiers: configuredModifiers } = useConfiguredDefaultModifiers({\n props,\n arrowElement,\n });\n\n const defaultProps = useMemo(\n () => ({ ...staticDefaultProps, modifiers: configuredModifiers }),\n [configuredModifiers, staticDefaultProps],\n );\n\n return defaultProps;\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useContext, useMemo } from 'react';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { useConfiguredDefaultModifiers } from './useConfiguredDefaultModifiers';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\n\nconst emptyObj = {};\n\nexport const useConfiguredDefaultProps = ({ props, arrowElement }) => {\n // don't move this out of the hook or `document.body` will explode\n const staticDefaultProps = useMemo(\n () => ({\n referenceElement: null,\n showPopover: false,\n closeContextMenu: noop,\n onClickOutside: noop,\n withoutPortal: false,\n withoutArrow: false,\n withoutAnimation: false,\n animationDuration: 100,\n portalDOMContainer: document.body,\n startPlacementPreference: 'top',\n placementOrderPreference: ['top', 'bottom', 'left', 'right'],\n extraPopperStyles: emptyObj,\n }),\n [],\n );\n const { modifiers: configuredModifiers } = useConfiguredDefaultModifiers({\n props,\n arrowElement,\n });\n\n const defaultProps = useMemo(\n () => ({ ...staticDefaultProps, modifiers: configuredModifiers }),\n [configuredModifiers, staticDefaultProps],\n );\n\n return defaultProps;\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAEA;AAGA,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,WAAW,CAAC;AAEX,MAAM,4BAA4B,CAAC,EAAE,OAAO,mBAAmB;AAEpE,QAAM,qBAAqB,QACzB,MAAO;AAAA,IACL,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,oBAAoB,SAAS;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,0BAA0B,CAAC,OAAO,UAAU,QAAQ,OAAO;AAAA,IAC3D,mBAAmB;AAAA,EACrB,IACA,CAAC,CACH;AACA,QAAM,EAAE,WAAW,wBAAwB,8BAA8B;AAAA,IACvE;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,eAAe,QACnB,MAAO,iCAAK,qBAAL,EAAyB,WAAW,oBAAoB,IAC/D,CAAC,qBAAqB,kBAAkB,CAC1C;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  import * as React from "react";
18
18
  import React2, { useMemo } from "react";
19
19
  import { createPortal } from "react-dom";
20
- import { describe } from "react-desc";
20
+ import { describe } from "@elliemae/ds-utilities";
21
21
  import { dspopperjsPropTypes } from "./propTypes";
22
22
  import { PopoverContent } from "./PopoverContent";
23
23
  import { useConfigDSPopperjs } from "./config/useConfigDSPopperjs";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe } from 'react-desc';\nimport { dspopperjsPropTypes } from './propTypes';\nimport { PopoverContent } from './PopoverContent';\nimport { useConfigDSPopperjs } from './config/useConfigDSPopperjs';\nimport type { DSDSPopperjsPropsT } from './index.d';\n\nconst DSPopperJS = (props: DSDSPopperjsPropsT): JSX.Element => {\n const {\n props: {\n showPopover,\n withoutAnimation,\n animationDuration,\n withoutPortal,\n withoutArrow,\n portalDOMContainer,\n zIndex,\n extraPopperStyles,\n },\n setPopperElement,\n setArrowElement,\n setIsAnimating,\n popoverHelper,\n isAnimating,\n } = useConfigDSPopperjs(props);\n const { children } = props;\n const { styles, attributes } = popoverHelper;\n const contentJSX = useMemo(\n () => (\n <PopoverContent\n setPopperElement={setPopperElement}\n popperStyles={{ ...styles.popper, ...extraPopperStyles }}\n popperAttributes={attributes.popper}\n setArrowElement={setArrowElement}\n arrowStyle={styles.arrow}\n withoutArrow={withoutArrow}\n withoutAnimation={withoutAnimation}\n animationDuration={animationDuration}\n zIndex={zIndex}\n showPopover={showPopover}\n setIsAnimating={setIsAnimating}\n >\n {children}\n </PopoverContent>\n ),\n [\n attributes.popper,\n children,\n setIsAnimating,\n showPopover,\n extraPopperStyles,\n setArrowElement,\n setPopperElement,\n styles.arrow,\n styles.popper,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n ],\n );\n if (showPopover || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (withoutPortal === false) return <>{createPortal(<>{contentJSX}</>, portalDOMContainer)}</>;\n }\n return null;\n};\n\nDSPopperJS.propTypes = dspopperjsPropTypes;\nDSPopperJS.displayName = 'DSPopperJS';\nconst DSPopperJSWithSchema = describe(DSPopperJS).description('A dimsum custom styling wrapper on top of popperjs');\nDSPopperJSWithSchema.propTypes = dspopperjsPropTypes;\n\nexport { DSPopperJS, DSPopperJSWithSchema };\nexport default DSPopperJS;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { describe } from '@elliemae/ds-utilities';\nimport { dspopperjsPropTypes } from './propTypes';\nimport { PopoverContent } from './PopoverContent';\nimport { useConfigDSPopperjs } from './config/useConfigDSPopperjs';\nimport type { DSDSPopperjsPropsT } from './index.d';\n\nconst DSPopperJS = (props: DSDSPopperjsPropsT): JSX.Element => {\n const {\n props: {\n showPopover,\n withoutAnimation,\n animationDuration,\n withoutPortal,\n withoutArrow,\n portalDOMContainer,\n zIndex,\n extraPopperStyles,\n },\n setPopperElement,\n setArrowElement,\n setIsAnimating,\n popoverHelper,\n isAnimating,\n } = useConfigDSPopperjs(props);\n const { children } = props;\n const { styles, attributes } = popoverHelper;\n const contentJSX = useMemo(\n () => (\n <PopoverContent\n setPopperElement={setPopperElement}\n popperStyles={{ ...styles.popper, ...extraPopperStyles }}\n popperAttributes={attributes.popper}\n setArrowElement={setArrowElement}\n arrowStyle={styles.arrow}\n withoutArrow={withoutArrow}\n withoutAnimation={withoutAnimation}\n animationDuration={animationDuration}\n zIndex={zIndex}\n showPopover={showPopover}\n setIsAnimating={setIsAnimating}\n >\n {children}\n </PopoverContent>\n ),\n [\n attributes.popper,\n children,\n setIsAnimating,\n showPopover,\n extraPopperStyles,\n setArrowElement,\n setPopperElement,\n styles.arrow,\n styles.popper,\n withoutArrow,\n withoutAnimation,\n animationDuration,\n zIndex,\n ],\n );\n if (showPopover || isAnimating) {\n if (withoutPortal === true) return contentJSX;\n if (withoutPortal === false) return <>{createPortal(<>{contentJSX}</>, portalDOMContainer)}</>;\n }\n return null;\n};\n\nDSPopperJS.propTypes = dspopperjsPropTypes;\nDSPopperJS.displayName = 'DSPopperJS';\nconst DSPopperJSWithSchema = describe(DSPopperJS).description('A dimsum custom styling wrapper on top of popperjs');\nDSPopperJSWithSchema.propTypes = dspopperjsPropTypes;\n\nexport { DSPopperJS, DSPopperJSWithSchema };\nexport default DSPopperJS;\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,aAAa,CAAC,UAA2C;AAC7D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,oBAAoB,KAAK;AAC7B,QAAM,EAAE,aAAa;AACrB,QAAM,EAAE,QAAQ,eAAe;AAC/B,QAAM,aAAa,QACjB,MACE,qCAAC;AAAA,IACC;AAAA,IACA,cAAc,kCAAK,OAAO,SAAW;AAAA,IACrC,kBAAkB,WAAW;AAAA,IAC7B;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEC,QACH,GAEF;AAAA,IACE,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AACA,MAAI,eAAe,aAAa;AAC9B,QAAI,kBAAkB;AAAM,aAAO;AACnC,QAAI,kBAAkB;AAAO,aAAO,4DAAG,aAAa,4DAAG,UAAW,GAAK,kBAAkB,CAAE;AAAA,EAC7F;AACA,SAAO;AACT;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU,EAAE,YAAY,oDAAoD;AAClH,qBAAqB,YAAY;AAGjC,IAAO,cAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { PropTypes } from "react-desc";
2
+ import { PropTypes } from "@elliemae/ds-utilities";
3
3
  const dspopperjsPropTypes = {
4
4
  referenceElement: PropTypes.element.description("popperjs DOM referenceElement").isRequired,
5
5
  showPopover: PropTypes.bool.description("whether or not to show the popper content").isRequired,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/propTypes.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from 'react-desc';\n\nexport const dspopperjsPropTypes = {\n /**\n * React ref to popperjs referenceElement\n */\n referenceElement: PropTypes.element.description('popperjs DOM referenceElement').isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\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 /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.element\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: 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('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\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 )\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue(1),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array\n .description('modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n children: PropTypes.node.description('The content of the popper').defaultValue(undefined),\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const dspopperjsPropTypes = {\n /**\n * React ref to popperjs referenceElement\n */\n referenceElement: PropTypes.element.description('popperjs DOM referenceElement').isRequired,\n /**\n * Wheter or not to show the popper content\n */\n showPopover: PropTypes.bool.description('whether or not to show the popper content').isRequired,\n /**\n * Callback to close the context menu, used for \"on click outside\",\n * if not provided click outside will not trigger anything\n */\n closeContextMenu: PropTypes.func\n .description(\n 'Callback to close the context menu, used for \"on click outside\",' +\n ' if not provided click outside will not trigger anything',\n )\n .defaultValue('() => {}'),\n /**\n * Wheter or not the popper content should appear in a DOM portal or not\n */\n withoutPortal: PropTypes.bool\n .description('Whether or not the popper content should appear in a DOM portal or not')\n .defaultValue(true),\n /**\n * Wheter or not the popper context menu should print the arrow\n */\n withoutArrow: PropTypes.bool\n .description('Whether or not the popper context menu should print the arrow')\n .defaultValue(false),\n /**\n * Whether or not the popper context menu should be animated\n */\n withoutAnimation: PropTypes.bool\n .description('Whether or not the popper context menu should be animated')\n .defaultValue(false),\n /**\n * Popper context menus Animation duration in ms\n */\n animationDuration: PropTypes.number.description('Popper context menus Animation duration in ms').defaultValue(100),\n /**\n * Bounding element to calculate upon, defaults to it is \"clippingParents\",\n * which are the scrolling containers that may cause the element to be partially or fully cut off.\n */\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 /**\n * When using portal, the container in which to append the DOM content, defaults to document body\n */\n portalDOMContainer: PropTypes.element\n .description('When using portal, the container in which to append the DOM content, defaults to document body')\n .defaultValue(undefined),\n /**\n * start placement preferences, as per popperjs placement option\n */\n startPlacementPreference: 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('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'top'\"),\n /**\n * Array of placement preferences, as per popperjs \"flip\" placement option\n */\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 )\n .description('Array of placement preferences, as per popperjs \"flip\" placement option')\n .defaultValue(\"['top', 'bottom', 'left', 'right']\"),\n /**\n * popperjs content z-index\n */\n zIndex: PropTypes.number.description('popperjs content z-index').defaultValue(1),\n /**\n * placement offset array\n */\n customOffset: PropTypes.arrayOf(PropTypes.number).description('placement offset array').defaultValue(1),\n /**\n * modifiers array for full-custom popper-js override\n * https://popper.js.org/docs/v2/modifiers/\n */\n modifiers: PropTypes.array\n .description('modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/')\n .defaultValue(1),\n extraPopperStyles: PropTypes.object\n .description('Extra object styles to attach to the popper element')\n .defaultValue({}),\n onClickOutside: PropTypes.func\n .description('Callback triggered when clicking outside the popper')\n .defaultValue(() => null),\n children: PropTypes.node.description('The content of the popper').defaultValue(undefined),\n};\n"],
5
5
  "mappings": "AAAA;ACAA;AAEO,MAAM,sBAAsB;AAAA,EAIjC,kBAAkB,UAAU,QAAQ,YAAY,+BAA+B,EAAE;AAAA,EAIjF,aAAa,UAAU,KAAK,YAAY,2CAA2C,EAAE;AAAA,EAKrF,kBAAkB,UAAU,KACzB,YACC,0HAEF,EACC,aAAa,UAAU;AAAA,EAI1B,eAAe,UAAU,KACtB,YAAY,wEAAwE,EACpF,aAAa,IAAI;AAAA,EAIpB,cAAc,UAAU,KACrB,YAAY,+DAA+D,EAC3E,aAAa,KAAK;AAAA,EAIrB,kBAAkB,UAAU,KACzB,YAAY,2DAA2D,EACvE,aAAa,KAAK;AAAA,EAIrB,mBAAmB,UAAU,OAAO,YAAY,+CAA+C,EAAE,aAAa,GAAG;AAAA,EAKjH,iBAAiB,UAAU,QACxB,YACC,8JAEF,EACC,aAAa,MAAS;AAAA,EAIzB,oBAAoB,UAAU,QAC3B,YAAY,gGAAgG,EAC5G,aAAa,MAAS;AAAA,EAIzB,0BAA0B,UAAU,MAAM;AAAA,IACxC;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,+DAA+D,EAC3E,aAAa,OAAO;AAAA,EAIvB,0BAA0B,UAAU,QAClC,UAAU,MAAM;AAAA,IACd;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,CACH,EACG,YAAY,yEAAyE,EACrF,aAAa,oCAAoC;AAAA,EAIpD,QAAQ,UAAU,OAAO,YAAY,0BAA0B,EAAE,aAAa,CAAC;AAAA,EAI/E,cAAc,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,wBAAwB,EAAE,aAAa,CAAC;AAAA,EAKtG,WAAW,UAAU,MAClB,YAAY,8FAA8F,EAC1G,aAAa,CAAC;AAAA,EACjB,mBAAmB,UAAU,OAC1B,YAAY,qDAAqD,EACjE,aAAa,CAAC,CAAC;AAAA,EAClB,gBAAgB,UAAU,KACvB,YAAY,qDAAqD,EACjE,aAAa,MAAM,IAAI;AAAA,EAC1B,UAAU,UAAU,KAAK,YAAY,2BAA2B,EAAE,aAAa,MAAS;AAC1F;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import styled from "styled-components";
2
+ import { styled } from "@elliemae/ds-system";
3
3
  import { kfrm, css } from "@elliemae/ds-system";
4
4
  const showAnimation = kfrm`
5
5
  from {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { kfrm, css } from '@elliemae/ds-system';\n\ninterface StyledContentWrapperPropsT {\n zIndex: number;\n}\n\ninterface StyledAnimatedPopperPropsT {\n showPopover: boolean;\n animationDuration: number;\n withoutAnimation: boolean;\n}\n\nconst showAnimation = kfrm`\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n`;\n\nconst hideAnimation = kfrm`\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0.8);\n visibility: hidden;\n }\n`;\n\nexport const StyledPopoverContentWrapper = styled.div<StyledContentWrapperPropsT>`\n z-index: ${({ theme, zIndex }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport const StyledAnimatedPopper = styled.div<StyledAnimatedPopperPropsT>`\n box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 2px 4px rgba(16, 22, 26, 0.2), 0 8px 24px rgba(16, 22, 26, 0.2);\n\n ${({ showPopover, animationDuration, withoutAnimation }) =>\n !withoutAnimation &&\n css`\n animation: ${showPopover ? showAnimation : hideAnimation} ${animationDuration}ms ease-in;\n `}\n`;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { kfrm, css } from '@elliemae/ds-system';\n\ninterface StyledContentWrapperPropsT {\n zIndex: number;\n}\n\ninterface StyledAnimatedPopperPropsT {\n showPopover: boolean;\n animationDuration: number;\n withoutAnimation: boolean;\n}\n\nconst showAnimation = kfrm`\n from {\n opacity: 0;\n transform: scale(0.8);\n }\n\n to {\n opacity: 1;\n transform: scale(1);\n visibility: visible;\n }\n`;\n\nconst hideAnimation = kfrm`\n from {\n opacity: 1;\n transform: scale(1);\n }\n\n to {\n opacity: 0;\n transform: scale(0.8);\n visibility: hidden;\n }\n`;\n\nexport const StyledPopoverContentWrapper = styled.div<StyledContentWrapperPropsT>`\n z-index: ${({ theme, zIndex }) => zIndex ?? theme.zIndex.popper};\n`;\n\nexport const StyledAnimatedPopper = styled.div<StyledAnimatedPopperPropsT>`\n box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 2px 4px rgba(16, 22, 26, 0.2), 0 8px 24px rgba(16, 22, 26, 0.2);\n\n ${({ showPopover, animationDuration, withoutAnimation }) =>\n !withoutAnimation &&\n css`\n animation: ${showPopover ? showAnimation : hideAnimation} ${animationDuration}ms ease-in;\n `}\n`;\n"],
5
5
  "mappings": "AAAA;ACAA;AACA;AAYA,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAatB,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaf,MAAM,8BAA8B,OAAO;AAAA,aACrC,CAAC,EAAE,OAAO,aAAa,UAAU,MAAM,OAAO;AAAA;AAGpD,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,aAAa,mBAAmB,uBACnC,CAAC,oBACD;AAAA,mBACe,cAAc,gBAAgB,iBAAiB;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-popperjs",
3
- "version": "3.1.0-next.2",
3
+ "version": "3.1.0-next.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper JS Wrapper",
6
6
  "files": [
@@ -70,17 +70,9 @@
70
70
  "reportFile": "tests.xml",
71
71
  "indent": 4
72
72
  },
73
- "scripts": {
74
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
75
- "test": "node ../../scripts/testing/test.mjs",
76
- "lint": "node ../../scripts/lint.mjs",
77
- "dts": "node ../../scripts/dts.mjs",
78
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
79
- },
80
73
  "dependencies": {
81
- "@elliemae/ds-system": "3.1.0-next.2",
82
- "@elliemae/ds-utilities": "3.1.0-next.2",
83
- "react-desc": "~4.1.3",
74
+ "@elliemae/ds-system": "3.1.0-next.3",
75
+ "@elliemae/ds-utilities": "3.1.0-next.3",
84
76
  "react-popper": "~2.2.5"
85
77
  },
86
78
  "devDependencies": {
@@ -94,5 +86,13 @@
94
86
  "publishConfig": {
95
87
  "access": "public",
96
88
  "typeSafety": false
89
+ },
90
+ "scripts": {
91
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
92
+ "test": "node ../../scripts/testing/test.mjs",
93
+ "lint": "node ../../scripts/lint.mjs",
94
+ "dts": "node ../../scripts/dts.mjs",
95
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
96
+ "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
97
97
  }
98
- }
98
+ }